2023-01-17 14:34:39 +00:00
|
|
|
unit unitTest;
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
System.SysUtils, System.Types, System.Classes;
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free function 1, declaration }
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
function FreeFunc1(const Param: integer): integer;
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TStdClass
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
TStdClass = class(TObject)
|
|
|
|
private type
|
|
|
|
TStdInternalClass = class(TObject)
|
|
|
|
private
|
|
|
|
FName: string;
|
|
|
|
FId: integer;
|
|
|
|
|
|
|
|
public
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
|
|
|
procedure CopyTo(Dest: TStdInternalClass);
|
|
|
|
|
|
|
|
property Name: string read FName write FName;
|
|
|
|
property Id: integer read FId write FId;
|
|
|
|
end;
|
|
|
|
|
|
|
|
private
|
|
|
|
FId: integer;
|
|
|
|
FValue: string;
|
|
|
|
|
|
|
|
class var FInstCnt: integer;
|
|
|
|
|
|
|
|
class function Init(Cnt: integer): boolean;
|
|
|
|
class function DeInit(Cnt: integer): boolean;
|
2023-01-17 14:34:39 +00:00
|
|
|
class function ToType<X: class, constructor>(const Value: string): X;
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
procedure SetValue(const Value: string);
|
|
|
|
|
|
|
|
public
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
|
|
|
function Convert<X: class, constructor>(const Value: string): X;
|
|
|
|
|
|
|
|
class property InstCnt: integer read FInstCnt;
|
|
|
|
|
|
|
|
property PropId: integer read FId write FId;
|
|
|
|
property PropValue: string read FValue write SetValue;
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TGenericClass<T>
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
TGenericClass<T> = class(TObject)
|
|
|
|
private type
|
2023-01-17 14:34:39 +00:00
|
|
|
TGenericInternalClass<I, K> = class(TObject)
|
2022-11-10 13:50:02 +00:00
|
|
|
strict private
|
|
|
|
FName: string;
|
2023-01-17 14:34:39 +00:00
|
|
|
FId: I;
|
|
|
|
FValue: K;
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
public
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure CopyTo<J>(Dest: TGenericInternalClass<I, K>);
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
property Name: string read FName write FName;
|
2023-01-17 14:34:39 +00:00
|
|
|
property Id: I read FId write FId;
|
|
|
|
property Value: K read FValue write FValue;
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
strict private
|
|
|
|
FId: integer;
|
|
|
|
FValue: T;
|
|
|
|
|
|
|
|
class var FInstCnt: integer;
|
|
|
|
|
|
|
|
class function Init<I>(Cnt: integer): boolean;
|
|
|
|
class function DeInit(Cnt: integer): boolean;
|
|
|
|
|
|
|
|
procedure SetValue(const Value: T);
|
|
|
|
|
|
|
|
public
|
|
|
|
constructor Create;
|
|
|
|
destructor Destroy; override;
|
|
|
|
|
|
|
|
class property InstCnt: integer read FInstCnt;
|
|
|
|
|
|
|
|
property PropId: integer read FId write FId;
|
|
|
|
property PropValue: T read FValue write SetValue;
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TEnum
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
TEnum = (enMember1, enMember2, enMember3);
|
|
|
|
|
|
|
|
TEnumHelper = record helper for TEnum
|
|
|
|
public
|
|
|
|
function ToString: string;
|
|
|
|
class function FromString(const AString: string): TEnum; static;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TStdClassHelper
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
TStdClassHelper = class helper for TStdClass
|
|
|
|
public
|
|
|
|
function AsString: string;
|
|
|
|
class function FromString(const AString: string): TStdClass; static;
|
|
|
|
end;
|
|
|
|
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
2023-01-26 14:46:25 +00:00
|
|
|
// Free routines declarations
|
2022-11-10 13:50:02 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure FreeProc1(AParam: integer);
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
function FreeFunc2(const AParam: string): integer; inline;
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure FreeProc2(AParam: integer);
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
{function UnusedFreeFunc1(ANum: double): cardinal;}
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
procedure FreeProc3(AParam: integer); overload; inline;
|
|
|
|
procedure FreeProc3(AParam: string); overload; inline;
|
2022-12-23 10:15:00 +00:00
|
|
|
|
|
|
|
(*
|
2023-01-17 14:34:39 +00:00
|
|
|
function UnusedFreeFunc2(ANum: double): cardinal;
|
|
|
|
function UnusedFreeFunc3(ANum: double): cardinal;
|
2022-12-23 10:15:00 +00:00
|
|
|
*)
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{R *.dfm}
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
type
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Internal classes
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
TInternalClass = class(TObject)
|
|
|
|
public
|
|
|
|
function Init(Cnt: integer): boolean;
|
|
|
|
procedure SetValue(Cnt: integer);
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2022-11-10 13:50:02 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Free routines
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free function 3, forward declaration}
|
|
|
|
|
2022-11-10 13:50:02 +00:00
|
|
|
function FreeFunc3(const Param: integer): integer; forward;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free function 1, definition }
|
2022-11-10 13:50:02 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
function FreeFunc1(const Param: integer): integer;
|
2022-11-10 13:50:02 +00:00
|
|
|
begin
|
|
|
|
//
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
Result := 0;
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free procedure 1, definition }
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure FreeProc1(AParam: integer);
|
2022-12-23 10:15:00 +00:00
|
|
|
begin
|
|
|
|
// Do something
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free function 2, definition }
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
function FreeFunc2(const AParam: string): integer;
|
2022-12-23 10:15:00 +00:00
|
|
|
begin
|
|
|
|
// Do something
|
|
|
|
|
|
|
|
Result := 0;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
{
|
2023-01-26 14:46:25 +00:00
|
|
|
// Unused free function 1, definition
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
function UnusedFreeFunc1(ANum: double): cardinal;
|
2022-12-23 10:15:00 +00:00
|
|
|
begin
|
|
|
|
// Do something
|
|
|
|
|
|
|
|
Result := 0;
|
|
|
|
end;
|
2023-01-17 14:34:39 +00:00
|
|
|
}
|
2022-12-23 10:15:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free procedure 2, definition }
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure FreeProc2(AParam: integer);
|
|
|
|
begin
|
|
|
|
// Do something
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(*
|
2023-01-26 14:46:25 +00:00
|
|
|
// Unused free function 2, definition
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
function UnusedFreeFunc2(ANum: double): cardinal;
|
2022-12-23 10:15:00 +00:00
|
|
|
begin
|
|
|
|
// Do something
|
|
|
|
|
|
|
|
Result := 0;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Unused free function 3, definition }
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
function UnusedFreeFunc3(ANum: double): cardinal;
|
|
|
|
begin
|
|
|
|
// Do something
|
|
|
|
|
|
|
|
Result := 0;
|
|
|
|
end;
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free procedure 3 (overloaded), definition }
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
procedure FreeProc3(AParam: integer);
|
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2022-11-10 13:50:02 +00:00
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
procedure FreeProc3(AParam: string);
|
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ Free procedure 4, forward declaration}
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure FreeProc4(const Param: integer); forward;
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TStdClass
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
constructor TStdClass.Create;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
|
|
|
Init(Succ(InstCnt));
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
destructor TStdClass.Destroy;
|
|
|
|
begin
|
|
|
|
DeInit(Pred(InstCnt));
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
class function TStdClass.Init(Cnt: integer): boolean;
|
|
|
|
begin
|
|
|
|
FInstCnt := Cnt;
|
2023-01-17 14:34:39 +00:00
|
|
|
Result := true;
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
class function TStdClass.DeInit(Cnt: integer): boolean;
|
|
|
|
begin
|
|
|
|
FInstCnt := Cnt;
|
2023-01-17 14:34:39 +00:00
|
|
|
Result := true;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
class function TStdClass.ToType<X>(const Value: string): X;
|
|
|
|
begin
|
|
|
|
Result := X.Create;
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TStdClass.SetValue(const Value: string);
|
|
|
|
begin
|
|
|
|
FValue := Value;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TStdClass.Convert<X>(const Value: string): X;
|
|
|
|
begin
|
|
|
|
Result := ToType<X>(Value);
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TStdClass.TStdInternalClass
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
constructor TStdClass.TStdInternalClass.Create;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
destructor TStdClass.TStdInternalClass.Destroy;
|
|
|
|
begin
|
|
|
|
//
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TStdClass.TStdInternalClass.CopyTo(Dest: TStdInternalClass);
|
|
|
|
begin
|
|
|
|
Dest.Name := Name;
|
|
|
|
Dest.Id := Id;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Free routines
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free function 3 with internal procedure, definition }
|
2022-11-10 13:50:02 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
function FreeFunc3(const Param: integer): integer;
|
2022-11-10 13:50:02 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure InternalProc1(const Param: integer);
|
2022-11-10 13:50:02 +00:00
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
begin
|
|
|
|
//
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
Result := 0;
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free procedure 4 with internal function, definition }
|
2022-11-10 13:50:02 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure FreeProc4(const Param: integer);
|
2022-11-10 13:50:02 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
function InternalFunc1(const Param: integer): string;
|
2022-11-10 13:50:02 +00:00
|
|
|
begin
|
|
|
|
//
|
2023-01-17 14:34:39 +00:00
|
|
|
|
|
|
|
Result := '';
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free procedure 5 with internal procedure preceeded by a comment, declaration & definition }
|
2022-11-10 13:50:02 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure FreeProc5;
|
2022-11-10 13:50:02 +00:00
|
|
|
|
|
|
|
// Internal routine
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure InternalProc2;
|
2022-11-10 13:50:02 +00:00
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
{ Free procedure 6 (inline), declaration & definition }
|
|
|
|
|
|
|
|
procedure FreeProc6; inline;
|
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-10 13:50:02 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TGenericClass<T>
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
constructor TGenericClass<T>.Create;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
|
|
|
Init<string>(Succ(InstCnt));
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
destructor TGenericClass<T>.Destroy;
|
|
|
|
begin
|
|
|
|
DeInit(Pred(InstCnt));
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
// This is a class function
|
|
|
|
class function TGenericClass<T>.Init<I>(Cnt: integer): boolean;
|
|
|
|
begin
|
|
|
|
FInstCnt := Cnt;
|
2023-01-17 14:34:39 +00:00
|
|
|
Result := true;
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
// This is a class function
|
|
|
|
class function TGenericClass<T>.DeInit(Cnt: integer): boolean;
|
|
|
|
begin
|
|
|
|
FInstCnt := Cnt;
|
2023-01-17 14:34:39 +00:00
|
|
|
Result := true;
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TGenericClass<T>.SetValue(const Value: T);
|
|
|
|
begin
|
|
|
|
FValue := Value;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
2023-01-17 14:34:39 +00:00
|
|
|
// TGenericClass<T>.TGenericInternalClass<I, K>
|
2022-11-10 13:50:02 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
constructor TGenericClass<T>.TGenericInternalClass<I, K>.Create;
|
2022-11-10 13:50:02 +00:00
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
FName := '';
|
|
|
|
FId := Default(I);
|
|
|
|
FValue := Default(K);
|
2022-11-10 13:50:02 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
destructor TGenericClass<T>.TGenericInternalClass<I, K>.Destroy;
|
2022-11-10 13:50:02 +00:00
|
|
|
begin
|
|
|
|
//
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
procedure TGenericClass<T>.TGenericInternalClass<I, K>.CopyTo<J>(Dest: TGenericInternalClass<I, K>);
|
2022-11-10 13:50:02 +00:00
|
|
|
begin
|
|
|
|
Dest.Name := Name;
|
|
|
|
Dest.Id := Id;
|
|
|
|
Dest.Value := Value;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-26 14:46:25 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TInternalClass
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
function TInternalClass.Init(Cnt: integer): boolean;
|
|
|
|
begin
|
|
|
|
Result := true;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TInternalClass.SetValue(Cnt: integer);
|
|
|
|
begin
|
|
|
|
//
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-10 13:50:02 +00:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TEnumHelper
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
function TEnumHelper.ToString: string;
|
|
|
|
begin
|
|
|
|
case Self of
|
|
|
|
enMember2: Result := 'Member 2';
|
|
|
|
enMember3: Result := 'Member 3';
|
|
|
|
else Result := 'Unknown';
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
class function TEnumHelper.FromString(const AString: string): TEnum;
|
|
|
|
begin
|
|
|
|
if SameText(AString, 'Member 2') then
|
|
|
|
Result := enMember2
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2023-01-17 14:34:39 +00:00
|
|
|
else if SameText(AString, 'Member 3') then
|
2022-11-10 13:50:02 +00:00
|
|
|
Result := enMember3
|
2022-12-23 10:15:00 +00:00
|
|
|
|
2022-11-10 13:50:02 +00:00
|
|
|
else
|
|
|
|
Result := enMember1;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// TStdClassHelper
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
function TStdClassHelper.AsString: string;
|
|
|
|
begin
|
|
|
|
Result := 'TStdClass instance';
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
class function TStdClassHelper.FromString(const AString: string): TStdClass;
|
|
|
|
begin
|
|
|
|
Result := TStdClass.Create.Convert<TStdClass>(AString);
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
end.
|