FMX.Utils.TNonReentrantHelper.Execute

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

class function Execute(var Guard: Boolean; const Proc: TProc): Boolean; overload;
class function Execute<A>(var Guard: Boolean; const Proc: TProc<A>; const Arg: A): Boolean; overload;
class function Execute<R>(var Guard: Boolean; const Func: TFunc<R>; const Default: R): R; overload;
class function Execute<A; R>(var Guard: Boolean; const Func: TFunc<A, R>; const Arg: A; const Default: R): R; overload;

C++

__classmethod bool __fastcall Execute(bool &Guard, const System::Sysutils::_di_TProc Proc)/* overload */;
template<typename A> __classmethod bool __fastcall Execute(bool &Guard, const System::DelphiInterface<System::Sysutils::TProc__1<A> > Proc, const A Arg)/* overload */;
template<typename R> __classmethod R __fastcall Execute(bool &Guard, const System::DelphiInterface<System::Sysutils::TFunc__1<R> > Func, const R Default)/* overload */;
template<typename A, typename R> __classmethod R __fastcall Execute(bool &Guard, const System::DelphiInterface<System::Sysutils::TFunc__2<A,R> > Func, const A Arg, const R Default)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
FMX.Utils.pas
FMX.Utils.hpp
FMX.Utils TNonReentrantHelper


説明

ガード変数を使用して、再入不能な手続きを実行します。

Execute メソッドは、以下のようにオーバーロードされています。

  • 第 1 のオーバーロード メソッドは、ガード変数 Guard を使用して再入不能な手続き TProc を実行します。手続きが実行されると ExecuteTrue を返します。
  • 第 2 のオーバーロード メソッドは、再入不能な手続き TProc<A>A 型の引数を受け取る手続き)を実行します。手続きが実行されると ExecuteTrue を返します。
  • 第 3 のオーバーロード メソッドは、再入不能な関数 TFunc<R> を実行します。Execute は以下を返します。
    • 関数が実行された場合には関数の結果(R 型)
    • コードが実行されなかった場合には型 R のデフォルト値。
  • 第 4 のオーバーロード メソッドは、再入不能な関数 TFunc<A,R>(引数の型が A、結果の型が R)を実行します。Execute は以下を返します。
    • 関数が実行された場合には関数の結果(R 型)
    • コードが実行されなかった場合には型 R のデフォルト値。

関連項目