CompThread.hpp 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 2002 by Borland Software Corporation
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'CompThread.pas' rev: 6.00
  5. #ifndef CompThreadHPP
  6. #define CompThreadHPP
  7. #pragma delphiheader begin
  8. #pragma option push -w-
  9. #pragma option push -Vx
  10. #include <Windows.hpp> // Pascal unit
  11. #include <Classes.hpp> // Pascal unit
  12. #include <SysInit.hpp> // Pascal unit
  13. #include <System.hpp> // Pascal unit
  14. //-- user supplied -----------------------------------------------------------
  15. namespace Compthread
  16. {
  17. //-- type declarations -------------------------------------------------------
  18. class DELPHICLASS TCompThread;
  19. class PASCALIMPLEMENTATION TCompThread : public System::TObject
  20. {
  21. typedef System::TObject inherited;
  22. private:
  23. unsigned FHandle;
  24. unsigned FThreadID;
  25. bool FTerminated;
  26. bool FSuspended;
  27. bool FFreeOnTerminate;
  28. bool FFinished;
  29. int FReturnValue;
  30. Classes::TNotifyEvent FOnTerminate;
  31. Classes::TThreadMethod FMethod;
  32. System::TObject* FSynchronizeException;
  33. void __fastcall CallOnTerminate(void);
  34. Classes::TThreadPriority __fastcall GetPriority(void);
  35. void __fastcall SetPriority(Classes::TThreadPriority Value);
  36. void __fastcall SetSuspended(bool Value);
  37. protected:
  38. virtual void __fastcall DoTerminate(void);
  39. virtual void __fastcall Execute(void) = 0 ;
  40. void __fastcall Synchronize(Classes::TThreadMethod Method);
  41. __property int ReturnValue = {read=FReturnValue, write=FReturnValue, nodefault};
  42. __property bool Terminated = {read=FTerminated, nodefault};
  43. public:
  44. __fastcall TCompThread(bool CreateSuspended);
  45. __fastcall virtual ~TCompThread(void);
  46. void __fastcall Resume(void);
  47. void __fastcall Suspend(void);
  48. virtual void __fastcall Terminate(void);
  49. bool __fastcall WaitFor(unsigned Milliseconds = (unsigned)(0xffffffff));
  50. __property bool FreeOnTerminate = {read=FFreeOnTerminate, write=FFreeOnTerminate, nodefault};
  51. __property unsigned Handle = {read=FHandle, nodefault};
  52. __property Classes::TThreadPriority Priority = {read=GetPriority, write=SetPriority, nodefault};
  53. __property bool Suspended = {read=FSuspended, write=SetSuspended, nodefault};
  54. __property unsigned ThreadID = {read=FThreadID, nodefault};
  55. __property Classes::TNotifyEvent OnTerminate = {read=FOnTerminate, write=FOnTerminate};
  56. };
  57. //-- var, const, procedure ---------------------------------------------------
  58. } /* namespace Compthread */
  59. using namespace Compthread;
  60. #pragma option pop // -w-
  61. #pragma option pop // -Vx
  62. #pragma delphiheader end.
  63. //-- end unit ----------------------------------------------------------------
  64. #endif // CompThread