System.TVariantManager

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

  TVariantManager = record
    VarClear: procedure(var V : Variant);
    VarCopy: procedure(var Dest: Variant; const Source: Variant);
    VarCopyNoInd: procedure; // ARGS PLEASE!
    VarCast: procedure(var Dest: Variant; const Source: Variant; VarType: Integer);
    VarCastOle: procedure(var Dest: Variant; const Source: Variant; VarType: Integer);
    VarToInt: function(const V: Variant): Integer;
    VarToInt64: function(const V: Variant): Int64;
    VarToBool: function(const V: Variant): Boolean;
    VarToReal: function(const V: Variant): Extended;
    VarToCurr: function(const V: Variant): Currency;
    VarToPStr: procedure(var S; const V: Variant);
    VarToLStr: procedure(var S: string; const V: Variant);
    VarToWStr: procedure(var S: _WideStr; const V: Variant);
    VarToIntf: procedure(var Unknown: IInterface; const V: Variant);
    VarToDisp: procedure(var Dispatch: IDispatch; const V: Variant);
    VarToDynArray: procedure(var DynArray: Pointer; const V: Variant; TypeInfo: Pointer);
    VarFromInt: procedure(var V: Variant; const Value: Integer; const Range: ShortInt);
    VarFromInt64: procedure(var V: Variant; const Value: Int64);
    VarFromBool: procedure(var V: Variant; const Value: Boolean);
    VarFromReal: procedure; // var V: Variant; const Value: Real
    VarFromTDateTime: procedure; // var V: Variant; const Value: TDateTime
    VarFromCurr: procedure; // var V: Variant; const Value: Currency
    VarFromPStr: procedure(var V: Variant; const Value: _ShortStr);
    VarFromLStr: procedure(var V: Variant; const Value: string);
    VarFromWStr: procedure(var V: Variant; const Value: _WideStr);
    VarFromIntf: procedure(var V: Variant; const Value: IInterface);
    VarFromDisp: procedure(var V: Variant; const Value: IDispatch);
    VarFromDynArray: procedure(var V: Variant; const DynArray: Pointer; TypeInfo: Pointer);
    OleVarFromPStr: procedure(var V: OleVariant; const Value: _ShortStr);
    OleVarFromLStr: procedure(var V: OleVariant; const Value: string);
    OleVarFromVar: procedure(var V: OleVariant; const Value: Variant);
    OleVarFromInt: procedure(var V: OleVariant; const Value: Integer; const Range: ShortInt);
    OleVarFromInt64: procedure(var V: OleVariant; const Value: Int64);
    VarOp: procedure(var Left: Variant; const Right: Variant; OpCode: TVarOp);
    VarCmp: procedure(const Left, Right: TVarData; const OpCode: TVarOp); { result is set in the flags }
    VarNeg: procedure(var V: Variant);
    VarNot: procedure(var V: Variant);
    DispInvoke: procedure(Dest: PVarData; const Source: TVarData;
      CallDesc: PCallDesc; Params: Pointer); cdecl;
    VarAddRef: procedure(var V: Variant);
    VarArrayRedim: procedure(var A : Variant; HighBound: Integer);
    VarArrayGet: function(var A: Variant; IndexCount: Integer;
      Indices: Integer): Variant; cdecl;
    VarArrayPut: procedure(var A: Variant; const Value: Variant;
      IndexCount: Integer; Indices: Integer); cdecl;
    WriteVariant: function(var T: Text; const V: Variant; Width: Integer): Pointer;
    Write0Variant: function(var T: Text; const V: Variant): Pointer;
  end deprecated;

C++

struct DECLSPEC_DRECORD TVariantManager _DEPRECATED_ATTRIBUTE0
{
public:
    void __fastcall (*VarClear)(Variant &V);
    void __fastcall (*VarCopy)(Variant &Dest, const Variant &Source);
    void __fastcall (*VarCopyNoInd)(void);
    void __fastcall (*VarCast)(Variant &Dest, const Variant &Source, int VarType);
    void __fastcall (*VarCastOle)(Variant &Dest, const Variant &Source, int VarType);
    int __fastcall (*VarToInt)(const Variant &V);
    __int64 __fastcall (*VarToInt64)(const Variant &V);
    bool __fastcall (*VarToBool)(const Variant &V);
    Extended __fastcall (*VarToReal)(const Variant &V);
    Currency __fastcall (*VarToCurr)(const Variant &V);
    void __fastcall (*VarToPStr)(void *S, const Variant &V);
    void __fastcall (*VarToLStr)(UnicodeString &S, const Variant &V);
    void __fastcall (*VarToWStr)(WideString &S, const Variant &V);
    void __fastcall (*VarToIntf)(_di_IInterface &Unknown, const Variant &V);
    void __fastcall (*VarToDisp)(_di_IDispatch &Dispatch, const Variant &V);
    void __fastcall (*VarToDynArray)(void * &DynArray, const Variant &V, void * TypeInfo);
    void __fastcall (*VarFromInt)(Variant &V, const int Value, const Int8 Range);
    void __fastcall (*VarFromInt64)(Variant &V, const __int64 Value);
    void __fastcall (*VarFromBool)(Variant &V, const bool Value);
    void __fastcall (*VarFromReal)(void);
    void __fastcall (*VarFromTDateTime)(void);
    void __fastcall (*VarFromCurr)(void);
    void __fastcall (*VarFromPStr)(Variant &V, const ShortString &Value);
    void __fastcall (*VarFromLStr)(Variant &V, const UnicodeString Value);
    void __fastcall (*VarFromWStr)(Variant &V, const WideString Value);
    void __fastcall (*VarFromIntf)(Variant &V, const _di_IInterface Value);
    void __fastcall (*VarFromDisp)(Variant &V, const _di_IDispatch Value);
    void __fastcall (*VarFromDynArray)(Variant &V, const void * DynArray, void * TypeInfo);
    void __fastcall (*OleVarFromPStr)(OleVariant &V, const ShortString &Value);
    void __fastcall (*OleVarFromLStr)(OleVariant &V, const UnicodeString Value);
    void __fastcall (*OleVarFromVar)(OleVariant &V, const Variant &Value);
    void __fastcall (*OleVarFromInt)(OleVariant &V, const int Value, const Int8 Range);
    void __fastcall (*OleVarFromInt64)(OleVariant &V, const __int64 Value);
    void __fastcall (*VarOp)(Variant &Left, const Variant &Right, int OpCode);
    void __fastcall (*VarCmp)(const TVarData &Left, const TVarData &Right, const int OpCode);
    void __fastcall (*VarNeg)(Variant &V);
    void __fastcall (*VarNot)(Variant &V);
    void __cdecl (*DispInvoke)(PVarData Dest, const TVarData &Source, PCallDesc CallDesc, void * Params);
    void __fastcall (*VarAddRef)(Variant &V);
    void __fastcall (*VarArrayRedim)(Variant &A, int HighBound);
    Variant __cdecl (*VarArrayGet)(Variant &A, int IndexCount, int Indices);
    void __cdecl (*VarArrayPut)(Variant &A, const Variant &Value, int IndexCount, int Indices);
    void * __fastcall (*WriteVariant)(TextFile &T, const Variant &V, int Width);
    void * __fastcall (*Write0Variant)(TextFile &T, const Variant &V);
};

Propriétés

Type Visibilité  Source Unité  Parent
record
struct
public
System.pas
System.hpp
System System

Description

Avertissement : TVariantManager est obsolète.

TVariantManager définit des points d'entrée pour les routines de conversion de variants et d'autres procédures qui déterminent le comportement des variants.

Le type TVariantManager est utilisé par les procédures GetVariantManager et SetVariantManager. Il définit des routines de conversion de type variant et des tâches d'implémentation de comportement de variant.

Remarque :  Bien qu'une version de TVariantManager soit déclarée dans sysclass.h, il ne doit pas être utilisé dans le code C++. L'utilisation d'un gestionnaire de variant pour personnaliser le comportement des variants n'est pas complètement prise en charge dans C++.

Voir aussi