|
@@ -125,6 +125,8 @@ type
|
|
function IsType(ATypeInfo: PTypeInfo): boolean; inline;
|
|
function IsType(ATypeInfo: PTypeInfo): boolean; inline;
|
|
function TryAsOrdinal(out AResult: int64): boolean;
|
|
function TryAsOrdinal(out AResult: int64): boolean;
|
|
function GetReferenceToRawData: Pointer;
|
|
function GetReferenceToRawData: Pointer;
|
|
|
|
+ procedure ExtractRawData(ABuffer: Pointer);
|
|
|
|
+ procedure ExtractRawDataNoCopy(ABuffer: Pointer);
|
|
class operator := (const AValue: String): TValue; inline;
|
|
class operator := (const AValue: String): TValue; inline;
|
|
class operator := (AValue: LongInt): TValue; inline;
|
|
class operator := (AValue: LongInt): TValue; inline;
|
|
class operator := (AValue: Single): TValue; inline;
|
|
class operator := (AValue: Single): TValue; inline;
|
|
@@ -2303,6 +2305,22 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TValue.ExtractRawData(ABuffer: Pointer);
|
|
|
|
+begin
|
|
|
|
+ if Assigned(FData.FValueData) then
|
|
|
|
+ FData.FValueData.ExtractRawData(ABuffer)
|
|
|
|
+ else if Assigned(FData.FTypeInfo) then
|
|
|
|
+ Move((@FData.FAsPointer)^, ABuffer^, DataSize);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TValue.ExtractRawDataNoCopy(ABuffer: Pointer);
|
|
|
|
+begin
|
|
|
|
+ if Assigned(FData.FValueData) then
|
|
|
|
+ FData.FValueData.ExtractRawDataNoCopy(ABuffer)
|
|
|
|
+ else if Assigned(FData.FTypeInfo) then
|
|
|
|
+ Move((@FData.FAsPointer)^, ABuffer^, DataSize);
|
|
|
|
+end;
|
|
|
|
+
|
|
class operator TValue.:=(const AValue: String): TValue;
|
|
class operator TValue.:=(const AValue: String): TValue;
|
|
begin
|
|
begin
|
|
Make(@AValue, System.TypeInfo(AValue), Result);
|
|
Make(@AValue, System.TypeInfo(AValue), Result);
|