System.SyncObjs.TInterlocked.Exchange

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

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 */;

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
function public
System.SyncObjs.pas
System.SyncObjs.hpp
System.SyncObjs TInterlocked

Beschreibung

Tauscht den Wert der zwei Methodenparameter aus.

Es gibt sieben Exchange-Überladungen und alle tauschen der Wert von Target mit Value aus. Die letzte Exchange-Methode hat generische Parameter und Rückgabetyp und kann Parameter aller Typen entgegennehmen.

Siehe auch