So sollte es aber eigentlich gehen:
Delphi-Quellcode:
TConVar = class
strict protected
m_sName: String;
m_sDesc: String;
m_flags: ConVarFlags;
public
function TestFlag(flag: ConVarFlag): Boolean;
property Description: String read m_sDesc;
property Flags: ConVarFlags read m_flags;
property Name: String read m_sName;
end;
TConVar<T> = class(TConVar)
private
m_value: T;
m_default: T;
m_type: TRTTIType;
public
function GetValue: T; overload;
procedure SetValue(Value: T; Force: Boolean); overload;
end;
TConvarDict = TDictionary<string,TConVar>;