月別アーカイブ: 2015年3月

静的クラスメソッド

クラス名から直接呼び出せる関数

宣言

class function Count: Integer; static;

実装


class function TTimeStep.Count: Integer;
var
tmpInfo :PTypeInfo;
tmpData :PTypeData;
begin
tmpInfo :=TypeInfo(TTimeStepEnum);
tmpData :=GetTypeData(tmpInfo);
Result := tmpData.MaxValue – tmpData.MinValue + 1;
end;