class abstract is a delay with Delphi for .Net days.
For unknown reasons, there is no (current) implementation for this keyword.
If you want to prevent the creation of an instance of an abstract class, this keyword will not help. Instead, do the following:
type TCableSPF = class abstract //code strict protected //Define all constructors for an abstract class as protected. constructor Create; virtual; reintroduce; end;
By defining all constructors as protected, only the descendant object can access the constructor, other code cannot access the constructor. Since you re-enter the virtual constructor, you also cannot create it using:
unit A; type TMyAbstractObject = class abstract(TObjectX) strict protected constructor Create; virtual; reintroduce; end; ... unit B; TMyClass = class of TObjectX; AbstractObjectInstance = TMyClass.Create; //Will not work for TMyAbstractObject
Note that you must not declare an override constructor. Instead, declare it virtual reintroduce (or just reintroduce if you don't want to allow virtual constructors).
Johan source share