System.SyncObjs.TInterlocked.Exchange

De RAD Studio API Documentation
Aller à : navigation, rechercher

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

Propriétés

Type Visibilité  Source Unité  Parent
function public
System.SyncObjs.pas
System.SyncObjs.hpp
System.SyncObjs TInterlocked

Description

Echange la valeur des deux paramètres de méthode.

It existe sept surcharges de Exchange, toutes échangeant la valeur de Target par Value. La dernière méthode Exchange a des paramètres génériques et un type de retour, et peut recevoir des paramètres de tout type.

Voir aussi