home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / ahmsyscm / _setup.1 / AHMTStoreData.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-12  |  5.1 KB  |  149 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) 'AHMTStoreData.pas' rev: 3.00
  6.  
  7. #ifndef AHMTStoreDataHPP
  8. #define AHMTStoreDataHPP
  9. #include <AHMSystem.hpp>
  10. #include <Registry.hpp>
  11. #include <IniFiles.hpp>
  12. #include <Dialogs.hpp>
  13. #include <Classes.hpp>
  14. #include <Messages.hpp>
  15. #include <Windows.hpp>
  16. #include <SysUtils.hpp>
  17. #include <SysInit.hpp>
  18. #include <System.hpp>
  19.  
  20. //-- user supplied -----------------------------------------------------------
  21.  
  22. namespace Ahmtstoredata
  23. {
  24. //-- type declarations -------------------------------------------------------
  25. enum TAHMRootKey { hkeyClassesRoot, hkeyCurrentUser, hkeyLocalMachine, hkeyUsers, hkeyCurrentConfig, 
  26.     hkeyDynData };
  27.  
  28. enum TAHMDatatype { sRegistry, sIniFile };
  29.  
  30. class DELPHICLASS TAHMRegistry;
  31. class PASCALIMPLEMENTATION TAHMRegistry : public Classes::TPersistent 
  32. {
  33.     typedef Classes::TPersistent inherited;
  34.     
  35. private:
  36.     TAHMRootKey FRootKey;
  37.     System::AnsiString FSection;
  38.     System::AnsiString FPath;
  39.     
  40. public:
  41.     __fastcall TAHMRegistry(void);
  42.     __fastcall virtual ~TAHMRegistry(void);
  43.     
  44. __published:
  45.     __property TAHMRootKey Rootkey = {read=FRootKey, write=FRootKey, default=1};
  46.     __property System::AnsiString Path = {read=FPath, write=FPath};
  47.     __property System::AnsiString Section = {read=FSection, write=FSection};
  48. };
  49.  
  50. class DELPHICLASS TAHMIniFile;
  51. class PASCALIMPLEMENTATION TAHMIniFile : public Classes::TPersistent 
  52. {
  53.     typedef Classes::TPersistent inherited;
  54.     
  55. private:
  56.     System::AnsiString FFilename;
  57.     System::AnsiString FSection;
  58.     
  59. public:
  60.     __fastcall TAHMIniFile(void);
  61.     __fastcall virtual ~TAHMIniFile(void);
  62.     
  63. __published:
  64.     __property System::AnsiString Filename = {read=FFilename, write=FFilename};
  65.     __property System::AnsiString Section = {read=FSection, write=FSection};
  66. };
  67.  
  68. class DELPHICLASS TAHMDataStore;
  69. class PASCALIMPLEMENTATION TAHMDataStore : public Classes::TPersistent 
  70. {
  71.     typedef Classes::TPersistent inherited;
  72.     
  73. private:
  74.     bool FEnabled;
  75.     TAHMDatatype FDatatype;
  76.     TAHMRegistry* FRegistry;
  77.     TAHMIniFile* FIniFile;
  78.     Classes::TNotifyEvent FOnError;
  79.     int FErrorInt;
  80.     System::AnsiString FErrorStr;
  81.     bool FErrorBool;
  82.     System::AnsiString __fastcall GetSection(void);
  83.     void __fastcall DoFix(void);
  84.     
  85. public:
  86.     __fastcall TAHMDataStore(void);
  87.     __fastcall virtual ~TAHMDataStore(void);
  88.     System::AnsiString __fastcall ReadStr(System::AnsiString Key);
  89.     int __fastcall ReadInt(System::AnsiString Key);
  90.     bool __fastcall ReadBool(System::AnsiString Key);
  91.     System::AnsiString __fastcall ReadCrypt(System::AnsiString Key);
  92.     void __fastcall WriteCrypt(System::AnsiString Key, System::AnsiString Value);
  93.     void __fastcall ReadStrs(Classes::TStringList* &Values);
  94.     void __fastcall WriteStr(System::AnsiString Key, System::AnsiString Value);
  95.     void __fastcall WriteInt(System::AnsiString Key, int Value);
  96.     void __fastcall WriteBool(System::AnsiString Key, bool Value);
  97.     void __fastcall DeleteKey(System::AnsiString Key);
  98.     void __fastcall Erase(void);
  99.     
  100. __published:
  101.     __property int ErrorInt = {read=FErrorInt, write=FErrorInt, nodefault};
  102.     __property System::AnsiString ErrorStr = {read=FErrorStr, write=FErrorStr};
  103.     __property bool ErrorBool = {read=FErrorBool, write=FErrorBool, nodefault};
  104.     __property Classes::TNotifyEvent OnError = {read=FOnError, write=FOnError};
  105.     __property bool Enabled = {read=FEnabled, write=FEnabled, default=1};
  106.     __property TAHMDatatype Datatype = {read=FDatatype, write=FDatatype, default=0};
  107.     __property TAHMRegistry* Registry = {read=FRegistry, write=FRegistry};
  108.     __property TAHMIniFile* Inifile = {read=FIniFile, write=FIniFile};
  109. };
  110.  
  111. class DELPHICLASS TAHMStoreData;
  112. class PASCALIMPLEMENTATION TAHMStoreData : public Ahmsystem::TAHMSystemsComponent 
  113. {
  114.     typedef Ahmsystem::TAHMSystemsComponent inherited;
  115.     
  116. private:
  117.     Classes::TNotifyEvent FOnError;
  118.     TAHMDataStore* FDataStore;
  119.     
  120. public:
  121.     __fastcall virtual TAHMStoreData(Classes::TComponent* AOwner);
  122.     __fastcall virtual ~TAHMStoreData(void);
  123.     System::AnsiString __fastcall ReadStr(System::AnsiString Key);
  124.     int __fastcall ReadInt(System::AnsiString Key);
  125.     bool __fastcall ReadBool(System::AnsiString Key);
  126.     System::AnsiString __fastcall ReadCrypt(System::AnsiString Key);
  127.     void __fastcall WriteCrypt(System::AnsiString Key, System::AnsiString Value);
  128.     void __fastcall ReadStrs(Classes::TStringList* &Values);
  129.     void __fastcall WriteStr(System::AnsiString Key, System::AnsiString Value);
  130.     void __fastcall WriteInt(System::AnsiString Key, int Value);
  131.     void __fastcall WriteBool(System::AnsiString Key, bool Value);
  132.     void __fastcall DeleteKey(System::AnsiString Key);
  133.     void __fastcall Erase(void);
  134.     
  135. __published:
  136.     __property Classes::TNotifyEvent OnError = {read=FOnError, write=FOnError};
  137.     __property TAHMDataStore* DataStore = {read=FDataStore, write=FDataStore};
  138. };
  139.  
  140. //-- var, const, procedure ---------------------------------------------------
  141. extern PACKAGE HKEY AHMHKeys[6];
  142.  
  143. }    /* namespace Ahmtstoredata */
  144. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  145. using namespace Ahmtstoredata;
  146. #endif
  147. //-- end unit ----------------------------------------------------------------
  148. #endif    // AHMTStoreData
  149.