TVariantManager defines entry points for variant conversion routines and other procedures that define variant behavior.
TVariantManager = record VarClear: procedure(var V : Variant); VarCopy: procedure(var Dest: Variant; const Source: Variant); VarCopyNoInd: procedure; 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: WideString; 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; VarFromTDateTime: procedure; VarFromCurr: procedure; VarFromPStr: procedure(var V: Variant; const Value: ShortString); VarFromLStr: procedure(var V: Variant; const Value: string); VarFromWStr: procedure(var V: Variant; const Value: WideString); 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: ShortString); 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); VarNeg: procedure(var V: Variant); VarNot: procedure(var V: Variant); DispInvoke: procedure(Dest: PVarData; const Source: TVarData; CallDesc: PCallDesc; Params: Pointer); VarAddRef: procedure(var V: Variant); VarArrayRedim: procedure(var A : Variant; HighBound: Integer); VarArrayGet: function(var A: Variant; IndexCount: Integer; Indices: Integer): Variant; VarArrayPut: procedure(var A: Variant; const Value: Variant; IndexCount: Integer; Indices: Integer); WriteVariant: function(var T: Text; const V: Variant; Width: Integer): Pointer; Write0Variant: function(var T: Text; const V: Variant): Pointer; end;
struct TVariantManager { procedure(var V : Variant) VarClear; procedure(var Dest: Variant; const Source: Variant) VarCopy; procedure VarCopyNoInd; procedure(var Dest: Variant; const Source: Variant; VarType: Integer) VarCast; procedure(var Dest: Variant; const Source: Variant; VarType: Integer) VarCastOle; function(const V: Variant): Integer VarToInt; function(const V: Variant): Int64 VarToInt64; function(const V: Variant): Boolean VarToBool; function(const V: Variant): Extended VarToReal; function(const V: Variant): Currency VarToCurr; procedure(var S; const V: Variant) VarToPStr; procedure(var S: string; const V: Variant) VarToLStr; procedure(var S: WideString; const V: Variant) VarToWStr; procedure(var Unknown: IInterface; const V: Variant) VarToIntf; procedure(var Dispatch: IDispatch; const V: Variant) VarToDisp; procedure(var DynArray: Pointer; const V: Variant; TypeInfo: Pointer) VarToDynArray; procedure(var V: Variant; const Value: Integer; const Range: ShortInt) VarFromInt; procedure(var V: Variant; const Value: Int64) VarFromInt64; procedure(var V: Variant; const Value: Boolean) VarFromBool; procedure VarFromReal; procedure VarFromTDateTime; procedure VarFromCurr; procedure(var V: Variant; const Value: ShortString) VarFromPStr; procedure(var V: Variant; const Value: string) VarFromLStr; procedure(var V: Variant; const Value: WideString) VarFromWStr; procedure(var V: Variant; const Value: IInterface) VarFromIntf; procedure(var V: Variant; const Value: IDispatch) VarFromDisp; procedure(var V: Variant; const DynArray: Pointer; TypeInfo: Pointer) VarFromDynArray; procedure(var V: OleVariant; const Value: ShortString) OleVarFromPStr; procedure(var V: OleVariant; const Value: string) OleVarFromLStr; procedure(var V: OleVariant; const Value: Variant) OleVarFromVar; procedure(var V: OleVariant; const Value: Integer; const Range: ShortInt) OleVarFromInt; procedure(var V: OleVariant; const Value: Int64) OleVarFromInt64; procedure(var Left: Variant; const Right: Variant; OpCode: TVarOp) VarOp; procedure(const Left, Right: TVarData; const OpCode: TVarOp) VarCmp; procedure(var V: Variant) VarNeg; procedure(var V: Variant) VarNot; procedure(Dest: PVarData; const Source: TVarData; CallDesc: PCallDesc; Params: Pointer) DispInvoke; procedure(var V: Variant) VarAddRef; procedure(var A : Variant; HighBound: Integer) VarArrayRedim; function(var A: Variant; IndexCount: Integer; Indices: Integer): Variant VarArrayGet; procedure(var A: Variant; const Value: Variant; IndexCount: Integer; Indices: Integer) VarArrayPut; function(var T: Text; const V: Variant; Width: Integer): Pointer WriteVariant; function(var T: Text; const V: Variant): Pointer Write0Variant; };
System
The TVariantManager type is used by the GetVariantManager and SetVariantManager procedures. It defines routines that perform Variant type conversions and other tasks that implement Variant behavior.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|