brookclasses.pas 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. (*
  2. Brook framework, Base Classes
  3. Copyright (C) 2014 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. unit BrookClasses;
  11. {$i brook.inc}
  12. interface
  13. uses
  14. BrookConsts, Classes, RtlConsts;
  15. type
  16. { Is the main interface for Brook. }
  17. IBrookInterface = interface(IInterface)[BROOK_GUID]
  18. end;
  19. { Is the main object for Brook. }
  20. TBrookObject = class(TObject)
  21. end;
  22. { Is the main class for Brook. }
  23. TBrookClass = class of TBrookObject;
  24. { Is the main interfaced object for Brook. }
  25. TBrookInterfacedObject = class(TInterfacedObject)
  26. end;
  27. { Is the main persistent for Brook. }
  28. TBrookPersistent = class(TPersistent)
  29. end;
  30. { Is the main component for Brook. }
  31. TBrookComponent = class(TComponent)
  32. end;
  33. { Is the main data module for Brook. }
  34. TBrookDataModule = class(TDataModule)
  35. public
  36. constructor Create(AOwner: TComponent); override;
  37. end;
  38. implementation
  39. { TBrookDataModule }
  40. constructor TBrookDataModule.Create(AOwner: TComponent);
  41. begin
  42. CreateNew(AOwner);
  43. if (ClassType <> TBrookDataModule) and not (csDesigning in ComponentState) then
  44. begin
  45. if not InitInheritedComponent(Self, TBrookDataModule) then
  46. raise EStreamError.CreateFmt(SErrNoStreaming, [ClassName]);
  47. if OldCreateOrder then
  48. DoCreate;
  49. end;
  50. end;
  51. end.