Difference between revisions of "Template:Object Types"

From Free Pascal wiki
Jump to navigationJump to search
(Adding reference.)
m (Adding links)
Line 2: Line 2:
 
|-
 
|-
 
! Feature
 
! Feature
! Record
+
! [[Record]]
! Object
+
! [[Object]]
! Class
+
! [[Class]]
 
|-
 
|-
 
| Encapsulation (combining data and methods + hiding visibility)
 
| Encapsulation (combining data and methods + hiding visibility)
Line 11: Line 11:
 
| Yes
 
| Yes
 
|-
 
|-
| Inheritance
+
| [[Inherited|Inheritance]]
 
| No
 
| No
 
| Yes
 
| Yes

Revision as of 23:00, 17 February 2021

Feature Record Object Class
Encapsulation (combining data and methods + hiding visibility) Yes Yes Yes
Inheritance No Yes Yes
Class constrcutor and destrutor Yes Yes Yes
Polymorphism (virtual methods) No Yes Yes
Memory allocation Stack Stack Heap
Operator overload (global) Yes Yes Yes
Operator overload (in type only) Yes No No
Type helpers Yes No Yes
Virtual constructors, class reference No No Yes
Variant part (case) as c++ union Yes No No
Bitpacked (really packing) Yes No No

Modified from https://forum.lazarus.freepascal.org/index.php/topic,30686.30.html (original author: ASerge).