home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 January / Chip_2000-01_cd.bin / zkuste / Delphi / kolekce / d345 / cdbu.exe / CoolDBUtilities / CBuilder3 / CoolDBUtils.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-03  |  9.0 KB  |  266 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1998 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'CoolDBUtils.pas' rev: 3.00
  6.  
  7. #ifndef CoolDBUtilsHPP
  8. #define CoolDBUtilsHPP
  9. #include <Registry.hpp>
  10. #include <DBTables.hpp>
  11. #include <Db.hpp>
  12. #include <Bde.hpp>
  13. #include <FileCtrl.hpp>
  14. #include <Forms.hpp>
  15. #include <Classes.hpp>
  16. #include <SysUtils.hpp>
  17. #include <Messages.hpp>
  18. #include <Windows.hpp>
  19. #include <SysInit.hpp>
  20. #include <System.hpp>
  21.  
  22. //-- user supplied -----------------------------------------------------------
  23.  
  24. namespace Cooldbutils
  25. {
  26. //-- type declarations -------------------------------------------------------
  27. enum TTablesAction { taAll, taFromMask, taFromList };
  28.  
  29. typedef SmallString<128>  TBDEString;
  30.  
  31. typedef void __fastcall (__closure *TActionInProgress)(System::TObject* Sender, int TablesNum, System::AnsiString 
  32.     CurName, int CurNum);
  33.  
  34. class DELPHICLASS TDBCUAboutBox;
  35. class PASCALIMPLEMENTATION TDBCUAboutBox : public System::TObject 
  36. {
  37.     typedef System::TObject inherited;
  38.     
  39. public:
  40.     /* TObject.Create */ __fastcall TDBCUAboutBox(void) : System::TObject() { }
  41.     /* TObject.Destroy */ __fastcall virtual ~TDBCUAboutBox(void) { }
  42.     
  43. };
  44.  
  45. class DELPHICLASS TCoolDBComponent;
  46. class PASCALIMPLEMENTATION TCoolDBComponent : public Classes::TComponent 
  47. {
  48.     typedef Classes::TComponent inherited;
  49.     
  50. private:
  51.     TDBCUAboutBox* FAboutBox;
  52.     TBDEString FDatabaseName;
  53.     TTablesAction FTablesAction;
  54.     Classes::TStrings* FTables;
  55.     System::AnsiString FTablesMask;
  56.     TActionInProgress FOnActionInProgress;
  57.     Classes::TNotifyEvent FOnExecuteBegin;
  58.     Classes::TNotifyEvent FOnExecuteEnd;
  59.     void __fastcall SetDatabaseName( TBDEString &Value);
  60.     void __fastcall SetTables(Classes::TStrings* Value);
  61.     
  62. protected:
  63.     DYNAMIC void __fastcall BeginExecute(void);
  64.     DYNAMIC void __fastcall EndExecute(void);
  65.     
  66. public:
  67.     __fastcall virtual TCoolDBComponent(Classes::TComponent* AOwner);
  68.     __fastcall virtual ~TCoolDBComponent(void);
  69.     DYNAMIC void __fastcall Execute(void) = 0;
  70.     __property TBDEString DatabaseName = {read=FDatabaseName, write=SetDatabaseName};
  71.     __property TTablesAction TablesAction = {read=FTablesAction, write=FTablesAction, default=0};
  72.     __property Classes::TStrings* Tables = {read=FTables, write=SetTables};
  73.     __property System::AnsiString TablesMask = {read=FTablesMask, write=FTablesMask};
  74.     __property TActionInProgress OnActionInProgress = {read=FOnActionInProgress, write=FOnActionInProgress
  75.         };
  76.     __property Classes::TNotifyEvent OnExecuteBegin = {read=FOnExecuteBegin, write=FOnExecuteBegin};
  77.     __property Classes::TNotifyEvent OnExecuteEnd = {read=FOnExecuteEnd, write=FOnExecuteEnd};
  78.     
  79. __published:
  80.     __property TDBCUAboutBox* About = {read=FAboutBox, write=FAboutBox};
  81. };
  82.  
  83. class DELPHICLASS TCoolDBBackup;
  84. class PASCALIMPLEMENTATION TCoolDBBackup : public Cooldbutils::TCoolDBComponent 
  85. {
  86.     typedef Cooldbutils::TCoolDBComponent inherited;
  87.     
  88. private:
  89.     TBDEString FDatabaseBackupName;
  90.     bool FDeleteOnDone;
  91.     bool FPackOnProgress;
  92.     void __fastcall SetDatabaseBackupName( TBDEString &Value);
  93.     
  94. public:
  95.     __fastcall virtual TCoolDBBackup(Classes::TComponent* AOwner);
  96.     DYNAMIC void __fastcall Execute(void);
  97.     
  98. __published:
  99.     __property TBDEString DatabaseBackupName = {read=FDatabaseBackupName, write=SetDatabaseBackupName};
  100.         
  101.     __property bool DeleteOnDone = {read=FDeleteOnDone, write=FDeleteOnDone, default=0};
  102.     __property bool PackOnProgress = {read=FPackOnProgress, write=FPackOnProgress, default=0};
  103.     __property DatabaseName ;
  104.     __property TablesAction ;
  105.     __property Tables ;
  106.     __property TablesMask ;
  107.     __property OnActionInProgress ;
  108.     __property OnExecuteBegin ;
  109.     __property OnExecuteEnd ;
  110. public:
  111.     /* TCoolDBComponent.Destroy */ __fastcall virtual ~TCoolDBBackup(void) { }
  112.     
  113. };
  114.  
  115. class DELPHICLASS TCoolDBPack;
  116. class PASCALIMPLEMENTATION TCoolDBPack : public Cooldbutils::TCoolDBComponent 
  117. {
  118.     typedef Cooldbutils::TCoolDBComponent inherited;
  119.     
  120. public:
  121.     DYNAMIC void __fastcall Execute(void);
  122.     
  123. __published:
  124.     __property DatabaseName ;
  125.     __property TablesAction ;
  126.     __property Tables ;
  127.     __property TablesMask ;
  128.     __property OnActionInProgress ;
  129.     __property OnExecuteBegin ;
  130.     __property OnExecuteEnd ;
  131. public:
  132.     /* TCoolDBComponent.Create */ __fastcall virtual TCoolDBPack(Classes::TComponent* AOwner) : Cooldbutils::
  133.         TCoolDBComponent(AOwner) { }
  134.     /* TCoolDBComponent.Destroy */ __fastcall virtual ~TCoolDBPack(void) { }
  135.     
  136. };
  137.  
  138. class DELPHICLASS TCoolDBStructureExporter;
  139. class PASCALIMPLEMENTATION TCoolDBStructureExporter : public Cooldbutils::TCoolDBComponent 
  140. {
  141.     typedef Cooldbutils::TCoolDBComponent inherited;
  142.     
  143. private:
  144.     System::AnsiString FFileName;
  145.     
  146. public:
  147.     DYNAMIC void __fastcall Execute(void);
  148.     
  149. __published:
  150.     __property System::AnsiString FileName = {read=FFileName, write=FFileName};
  151.     __property DatabaseName ;
  152.     __property TablesAction ;
  153.     __property Tables ;
  154.     __property TablesMask ;
  155.     __property OnActionInProgress ;
  156.     __property OnExecuteBegin ;
  157.     __property OnExecuteEnd ;
  158. public:
  159.     /* TCoolDBComponent.Create */ __fastcall virtual TCoolDBStructureExporter(Classes::TComponent* AOwner
  160.         ) : Cooldbutils::TCoolDBComponent(AOwner) { }
  161.     /* TCoolDBComponent.Destroy */ __fastcall virtual ~TCoolDBStructureExporter(void) { }
  162.     
  163. };
  164.  
  165. class DELPHICLASS TCoolDBStructureRestorer;
  166. class PASCALIMPLEMENTATION TCoolDBStructureRestorer : public Cooldbutils::TCoolDBComponent 
  167. {
  168.     typedef Cooldbutils::TCoolDBComponent inherited;
  169.     
  170. private:
  171.     System::AnsiString FFileName;
  172.     
  173. public:
  174.     DYNAMIC void __fastcall Execute(void);
  175.     
  176. __published:
  177.     __property System::AnsiString FileName = {read=FFileName, write=FFileName};
  178.     __property DatabaseName ;
  179.     __property TablesAction ;
  180.     __property Tables ;
  181.     __property TablesMask ;
  182.     __property OnActionInProgress ;
  183.     __property OnExecuteBegin ;
  184.     __property OnExecuteEnd ;
  185. public:
  186.     /* TCoolDBComponent.Create */ __fastcall virtual TCoolDBStructureRestorer(Classes::TComponent* AOwner
  187.         ) : Cooldbutils::TCoolDBComponent(AOwner) { }
  188.     /* TCoolDBComponent.Destroy */ __fastcall virtual ~TCoolDBStructureRestorer(void) { }
  189.     
  190. };
  191.  
  192. class DELPHICLASS TCoolDBUpdater;
  193. class PASCALIMPLEMENTATION TCoolDBUpdater : public Cooldbutils::TCoolDBComponent 
  194. {
  195.     typedef Cooldbutils::TCoolDBComponent inherited;
  196.     
  197. private:
  198.     TBDEString FDatabaseImporterName;
  199.     bool FDeleteOnDone;
  200.     void __fastcall SetDatabaseImporterName( TBDEString &Value);
  201.     
  202. public:
  203.     __fastcall virtual TCoolDBUpdater(Classes::TComponent* AOwner);
  204.     DYNAMIC void __fastcall Execute(void);
  205.     
  206. __published:
  207.     __property TBDEString DatabaseImporterName = {read=FDatabaseImporterName, write=SetDatabaseImporterName
  208.         };
  209.     __property bool DeleteOnDone = {read=FDeleteOnDone, write=FDeleteOnDone, default=0};
  210.     __property DatabaseName ;
  211.     __property TablesAction ;
  212.     __property Tables ;
  213.     __property TablesMask ;
  214.     __property OnActionInProgress ;
  215.     __property OnExecuteBegin ;
  216.     __property OnExecuteEnd ;
  217. public:
  218.     /* TCoolDBComponent.Destroy */ __fastcall virtual ~TCoolDBUpdater(void) { }
  219.     
  220. };
  221.  
  222. class DELPHICLASS TCoolDBUpdater2;
  223. class PASCALIMPLEMENTATION TCoolDBUpdater2 : public Cooldbutils::TCoolDBUpdater 
  224. {
  225.     typedef Cooldbutils::TCoolDBUpdater inherited;
  226.     
  227. public:
  228.     DYNAMIC void __fastcall Execute(void);
  229. public:
  230.     /* TCoolDBUpdater.Create */ __fastcall virtual TCoolDBUpdater2(Classes::TComponent* AOwner) : Cooldbutils::
  231.         TCoolDBUpdater(AOwner) { }
  232.     
  233. public:
  234.     /* TCoolDBComponent.Destroy */ __fastcall virtual ~TCoolDBUpdater2(void) { }
  235.     
  236. };
  237.  
  238. //-- var, const, procedure ---------------------------------------------------
  239. extern PACKAGE void __fastcall CopyTable(Dbtables::TTable* &Table, System::AnsiString SrcTableName, 
  240.     System::AnsiString DestName);
  241. extern PACKAGE void __fastcall AddPrimaryIndex(Dbtables::TTable* Table);
  242. extern PACKAGE bool __fastcall AliasExists(System::AnsiString AliasName);
  243. extern PACKAGE bool __fastcall TableExists(System::AnsiString AliasName, System::AnsiString TableName
  244.     );
  245. extern PACKAGE System::AnsiString __fastcall GetAliasPath(System::AnsiString AliasName);
  246. extern PACKAGE void __fastcall ChangeField(Dbtables::TTable* Table, Db::TField* Field, Bde::pFLDDesc 
  247.     FieldsDesc);
  248. extern PACKAGE void __fastcall AddField(Dbtables::TTable* Table, Bde::pFLDDesc FieldsDesc);
  249. extern PACKAGE void __fastcall DeleteField(Dbtables::TTable* Table, Db::TField* Field);
  250. extern PACKAGE void __fastcall TableRestructure(Dbtables::TTable* tblSource, Dbtables::TTable* tblDestination
  251.     );
  252. extern PACKAGE void __fastcall ChangeIndex(Dbtables::TTable* Table, const Bde::IDXDesc &IndexDesc, int 
  253.     Index);
  254. extern PACKAGE Classes::TStringList* __fastcall GetIndexes(Dbtables::TTable* Table);
  255. extern PACKAGE bool __fastcall GetIndexDesc(Dbtables::TTable* Table, System::AnsiString IndexName, Bde::IDXDesc 
  256.     &IndexDesc);
  257. extern PACKAGE void __fastcall IndexesRestructure(Dbtables::TTable* tblSource, Dbtables::TTable* tblDestination
  258.     );
  259.  
  260. }    /* namespace Cooldbutils */
  261. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  262. using namespace Cooldbutils;
  263. #endif
  264. //-- end unit ----------------------------------------------------------------
  265. #endif    // CoolDBUtils
  266.