System.SyncObjs.TInterlocked.Exchange

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

Delphi

class function Exchange(var Target: Pointer; Value: Pointer): Pointer; overload; static; inline;
class function Exchange(var Target: Integer; Value: Integer): Integer; overload; static; inline;
class function Exchange(var Target: Int64; Value: Int64): Int64; overload; static; inline;
class function Exchange(var Target: TObject; Value: TObject): TObject; overload; static; inline;
class function Exchange(var Target: Double; Value: Double): Double; overload; static; inline;
class function Exchange(var Target: Single; Value: Single): Single; overload; static; inline;
class function Exchange<T: class>(var Target: T; Value: T): T; overload; static; inline;

C++

static void * __fastcall Exchange(void * &Target, void * Value)/* overload */;
static int __fastcall Exchange(int &Target, int Value)/* overload */;
static __int64 __fastcall Exchange(__int64 &Target, __int64 Value)/* overload */;
static System::TObject* __fastcall Exchange(System::TObject* &Target, System::TObject* Value)/* overload */;
static double __fastcall Exchange(double &Target, double Value)/* overload */;
static float __fastcall Exchange(float &Target, float Value)/* overload */;
template<typename T> static T __fastcall Exchange(T &Target, T Value)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.SyncObjs.pas
System.SyncObjs.hpp
System.SyncObjs TInterlocked

説明

2 つのメソッドのパラメータの値を交換します。

Exchange のオーバーロードは 7 つあり、それらはすべて TargetValue の値を交換します。最後の Exchange メソッドはジェネリック パラメータを持ち、型を返して、いずれの型のパラメータも受け取ることができます。

関連項目