ListSort.hpp 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 2002 by Borland Software Corporation
  3. // All rights reserved
  4. // (DO NOT EDIT: machine generated header) 'ListSort.pas' rev: 6.00
  5. #ifndef ListSortHPP
  6. #define ListSortHPP
  7. #pragma delphiheader begin
  8. #pragma option push -w-
  9. #pragma option push -Vx
  10. #include <SysUtils.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 Listsort
  16. {
  17. //-- type declarations -------------------------------------------------------
  18. typedef int __fastcall (__closure *TCompareFunction)(System::TObject* Sender, void * Item1, void * Item2);
  19. typedef void __fastcall (__closure *TOnListEvent)(System::TObject* Sender, void * Item);
  20. typedef void __fastcall (__closure *TBatchControlEvent)(System::TObject* Sender, void * Item);
  21. class DELPHICLASS TSortedList;
  22. class PASCALIMPLEMENTATION TSortedList : public Classes::TList
  23. {
  24. typedef Classes::TList inherited;
  25. private:
  26. TCompareFunction FCompare;
  27. TOnListEvent FOnAdd;
  28. TOnListEvent FOnModify;
  29. TOnListEvent FOnErase;
  30. bool FAllowDuplicates;
  31. public:
  32. __fastcall TSortedList(void);
  33. HIDESBASE int __fastcall Add(void * Item);
  34. HIDESBASE void __fastcall Clear(void);
  35. HIDESBASE void __fastcall Delete(int Index);
  36. int __fastcall FindObject(void * Item);
  37. HIDESBASE int __fastcall Insert(int Index, void * Item);
  38. int __fastcall Rearrange(void * Item);
  39. HIDESBASE void __fastcall Remove(void * Item);
  40. HIDESBASE void __fastcall Sort(void);
  41. __property bool AllowDuplicates = {read=FAllowDuplicates, write=FAllowDuplicates, nodefault};
  42. __property TOnListEvent OnAdd = {read=FOnAdd, write=FOnAdd};
  43. __property TCompareFunction OnCompare = {read=FCompare, write=FCompare};
  44. __property TOnListEvent OnModify = {read=FOnModify, write=FOnModify};
  45. __property TOnListEvent OnErase = {read=FOnErase, write=FOnErase};
  46. public:
  47. #pragma option push -w-inl
  48. /* TList.Destroy */ inline __fastcall virtual ~TSortedList(void) { }
  49. #pragma option pop
  50. };
  51. class DELPHICLASS TBatchControl;
  52. class PASCALIMPLEMENTATION TBatchControl : public Classes::TComponent
  53. {
  54. typedef Classes::TComponent inherited;
  55. private:
  56. TBatchControlEvent FOnProcess;
  57. TSortedList* FList;
  58. public:
  59. __property TSortedList* List = {read=FList, write=FList};
  60. __fastcall virtual TBatchControl(Classes::TComponent* AOwner);
  61. __fastcall virtual ~TBatchControl(void);
  62. void __fastcall Execute(void);
  63. __published:
  64. __property TBatchControlEvent OnProcess = {read=FOnProcess, write=FOnProcess};
  65. };
  66. //-- var, const, procedure ---------------------------------------------------
  67. extern PACKAGE void __fastcall Register(void);
  68. } /* namespace Listsort */
  69. using namespace Listsort;
  70. #pragma option pop // -w-
  71. #pragma option pop // -Vx
  72. #pragma delphiheader end.
  73. //-- end unit ----------------------------------------------------------------
  74. #endif // ListSort