objpash.inc 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1997,98 by Florian Klaempfl
  5. member of the Free Pascal development team
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {***********************************************************************
  13. This file contains the base declarations of Object Pascal
  14. as declared by Delphi 3.0
  15. This file is intended to be used with Free Pascal and should be
  16. included in the system unit.
  17. ***********************************************************************}
  18. type
  19. tobject = class;
  20. tclass = class of tobject;
  21. tobject = class
  22. { please don't change the order of virtual methods, because }
  23. { their vmt offsets are used by some assembler code which uses }
  24. { hard coded addresses (FK) }
  25. constructor create;
  26. destructor destroy;virtual;
  27. class function newinstance : tobject;virtual;
  28. procedure freeinstance;virtual;
  29. procedure free;
  30. class function initinstance(instance : pointer) : tobject;
  31. procedure cleanupinstance;
  32. function classtype : tclass;
  33. class function classinfo : pointer;
  34. class function classname : shortstring;
  35. class function classnameis(const name : string) : boolean;
  36. class function classparent : tclass;
  37. class function instancesize : longint;
  38. class function inheritsfrom(aclass : tclass) : boolean;
  39. { message handling routines }
  40. procedure dispatch(var message);
  41. procedure defaulthandler(var message);virtual;
  42. class function methodaddress(const name : shortstring) : pointer;
  43. class function methodname(address : pointer) : shortstring;
  44. function fieldaddress(const name : shortstring) : pointer;
  45. { interface functions, I don't know if we need this }
  46. {
  47. function getinterface(const iid : tguid;out obj) : boolean;
  48. class function getinterfaceentry(const iid : tguid) : pinterfaceentry;
  49. class function getinterfacetable : pinterfacetable;
  50. }
  51. function safecallexception(exceptobject : tobject;
  52. exceptaddr : pointer) : integer;virtual;
  53. end;
  54. var
  55. abstracterrorproc : pointer;
  56. {
  57. $Log$
  58. Revision 1.1 1998-03-25 11:18:43 root
  59. Initial revision
  60. Revision 1.5 1998/01/27 22:05:10 florian
  61. * again small fixes to DOM (Delphi Object Model)
  62. Revision 1.4 1998/01/26 12:00:25 michael
  63. + Added log at the end
  64. Working file: rtl/inc/objpash.inc
  65. description:
  66. ----------------------------
  67. revision 1.3
  68. date: 1998/01/23 15:54:49; author: florian; state: Exp; lines: +5 -2
  69. + small extensions to FCL object model
  70. ----------------------------
  71. revision 1.2
  72. date: 1998/01/23 10:48:32; author: florian; state: Exp; lines: +5 -1
  73. * syntax errors fixed
  74. + implementation of all methods added, at least with empty body
  75. ----------------------------
  76. revision 1.1
  77. date: 1998/01/09 16:05:43; author: florian; state: Exp;
  78. + ojbpash.inc and objpas.inc
  79. * $E- from objects.pp removed to avoid a warning
  80. =============================================================================
  81. }