вторник, 13 января 2015 г.

MindStream. Коротко. Скрытие методов. Только код

Репозитарий - https://bitbucket.org/ingword/mindstream/src/0b84d9ed2f7caaf0f038bd2dda55bbc7bb269520/AbstractShapes/msSpecialArrow.pas?at=ShapesGroup

И ещё - https://bitbucket.org/ingword/mindstream/commits/ac3fa2f9459760b4883aebb8aad37ad07671493b?at=ShapesGroup

Код:

unit msSpecialArrow;

interface

uses
 System.Types,
 msInterfaces,
 msLineWithArrow
 ;

type
 TmsSpecialArrow = class abstract(TmsLineWithArrow)
 protected
  class function InitialLength: Integer;
  class function CreateCompletedInternal(const aStartPoint: TPointF; const aFinishPoint: TPointF): ImsShape;
 public
  class procedure CreateCompleted;
 end;//TmsSpecialArrow

implementation

// TmsSpecialArrow

class function TmsSpecialArrow.CreateCompletedInternal(const aStartPoint: TPointF; const aFinishPoint: TPointF): ImsShape;
begin
 Result := inherited CreateCompleted(aStartPoint, aFinishPoint);
end;

class procedure TmsSpecialArrow.CreateCompleted;
begin
 Assert(false, 'Используйте фабрику Create');
end;

class function TmsSpecialArrow.InitialLength: Integer;
begin
 Result := 50;
end;

end.

Комментариев нет:

Отправить комментарий