FMX.Utils.ValidateInheritance
Delphi
procedure ValidateInheritance(const AValue: TPersistent; const AClass: TClass; const CanBeNil: Boolean = True);
C++
extern DELPHI_PACKAGE void __fastcall ValidateInheritance(System::Classes::TPersistent* const AValue, const System::TClass AClass, const bool CanBeNil = true);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
public | FMX.Utils.pas FMX.Utils.hpp |
FMX.Utils | FMX.Utils |
説明
クラスが別のクラスのインスタンスであるかどうか、または、別のクラスを継承しているかどうかを確認します。
AValue
が AClass
のインスタンスでない、または、継承していない場合、ValidateInheritance では EArgumentException が発生します。
AValue
が nil でなく、CanBeNil
が False
の場合、ValidateInheritance では EArgumentNilException が発生します。
例外
AValue
が条件を満たさない場合は、EArgumentException が発生します。AValue
またはAClass
が nil の場合は、EArgumentNilException が発生します。