2
0

brookclasses.pas 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. (*
  2. Brook for Free Pascal
  3. Copyright (C) 2014-2019 Silvio Clecio
  4. See the file LICENSE.txt, included in this distribution,
  5. for details about the copyright.
  6. This library is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. *)
  10. { Base classes. }
  11. unit BrookClasses;
  12. {$i brook.inc}
  13. interface
  14. uses
  15. BrookConsts, Classes, RtlConsts;
  16. type
  17. { Is the main interface for Brook. }
  18. IBrookInterface = interface(IInterface)[BROOK_GUID]
  19. end;
  20. { Is the main object for Brook. }
  21. TBrookObject = class(TObject)
  22. end;
  23. { Is the main class for Brook. }
  24. TBrookClass = class of TBrookObject;
  25. { Is the main interfaced object for Brook. }
  26. TBrookInterfacedObject = class(TInterfacedObject)
  27. end;
  28. { Is the main persistent for Brook. }
  29. TBrookPersistent = class(TPersistent)
  30. end;
  31. { Is the main component for Brook. }
  32. TBrookComponent = class(TComponent)
  33. end;
  34. { Is the main data module for Brook. }
  35. TBrookDataModule = class(TDataModule)
  36. public
  37. constructor Create(AOwner: TComponent); override;
  38. end;
  39. implementation
  40. { TBrookDataModule }
  41. constructor TBrookDataModule.Create(AOwner: TComponent);
  42. begin
  43. CreateNew(AOwner);
  44. if (ClassType <> TBrookDataModule) and not (csDesigning in ComponentState) then
  45. begin
  46. if not InitInheritedComponent(Self, TBrookDataModule) then
  47. raise EStreamError.CreateFmt(SErrNoStreaming, [ClassName]);
  48. if OldCreateOrder then
  49. DoCreate;
  50. end;
  51. end;
  52. end.