mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 16:37:29 +02:00
IDE: improved TTypeAliasOrderList.Create
git-svn-id: trunk@50218 -
This commit is contained in:
parent
62d50f53a1
commit
db5d7eaeaf
@ -411,6 +411,8 @@ type
|
|||||||
private
|
private
|
||||||
FList: array of string;
|
FList: array of string;
|
||||||
public
|
public
|
||||||
|
constructor Create(const AliasNames: array of string);
|
||||||
|
|
||||||
procedure Add(const AliasName: string);
|
procedure Add(const AliasName: string);
|
||||||
procedure Add(const AliasNames: array of string);
|
procedure Add(const AliasNames: array of string);
|
||||||
procedure Insert(const AliasName: string; const Pos: Integer);
|
procedure Insert(const AliasName: string; const Pos: Integer);
|
||||||
@ -1106,45 +1108,37 @@ end;
|
|||||||
function BooleanTypesOrderList: TTypeAliasOrderList;
|
function BooleanTypesOrderList: TTypeAliasOrderList;
|
||||||
begin
|
begin
|
||||||
if FBooleanTypesOrderList=nil then
|
if FBooleanTypesOrderList=nil then
|
||||||
begin
|
FBooleanTypesOrderList:=TTypeAliasOrderList.Create([
|
||||||
FBooleanTypesOrderList:=TTypeAliasOrderList.Create;
|
|
||||||
FBooleanTypesOrderList.Add([
|
|
||||||
'LongBool', 'WordBool', 'Boolean', 'ByteBool']);
|
'LongBool', 'WordBool', 'Boolean', 'ByteBool']);
|
||||||
end;
|
|
||||||
Result := FBooleanTypesOrderList;
|
Result := FBooleanTypesOrderList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function IntegerTypesOrderList: TTypeAliasOrderList;
|
function IntegerTypesOrderList: TTypeAliasOrderList;
|
||||||
begin
|
begin
|
||||||
if FIntegerTypesOrderList=nil then
|
if FIntegerTypesOrderList=nil then
|
||||||
begin
|
FIntegerTypesOrderList:=TTypeAliasOrderList.Create([
|
||||||
FIntegerTypesOrderList:=TTypeAliasOrderList.Create;
|
|
||||||
FIntegerTypesOrderList.Add([
|
|
||||||
'Int64', 'QWord', 'SizeInt', 'LongInt', 'LongWord', 'Integer', 'Cardinal',
|
'Int64', 'QWord', 'SizeInt', 'LongInt', 'LongWord', 'Integer', 'Cardinal',
|
||||||
'SmallInt', 'Word', 'ShortInt', 'Byte']);
|
'SmallInt', 'Word', 'ShortInt', 'Byte']);
|
||||||
end;
|
|
||||||
Result := FIntegerTypesOrderList;
|
Result := FIntegerTypesOrderList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function RealTypesOrderList: TTypeAliasOrderList;
|
function RealTypesOrderList: TTypeAliasOrderList;
|
||||||
begin
|
begin
|
||||||
if FRealTypesOrderList=nil then
|
if FRealTypesOrderList=nil then
|
||||||
begin
|
FRealTypesOrderList:=TTypeAliasOrderList.Create([
|
||||||
FRealTypesOrderList:=TTypeAliasOrderList.Create;
|
|
||||||
FRealTypesOrderList.Add([
|
|
||||||
'Extended', 'Double', 'Single']);
|
'Extended', 'Double', 'Single']);
|
||||||
end;
|
|
||||||
Result := FRealTypesOrderList;
|
Result := FRealTypesOrderList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function StringTypesOrderList: TTypeAliasOrderList;
|
function StringTypesOrderList: TTypeAliasOrderList;
|
||||||
begin
|
begin
|
||||||
if FStringTypesOrderList=nil then
|
if FStringTypesOrderList=nil then
|
||||||
begin
|
FStringTypesOrderList:=TTypeAliasOrderList.Create([
|
||||||
FStringTypesOrderList:=TTypeAliasOrderList.Create;
|
|
||||||
FStringTypesOrderList.Add([
|
|
||||||
'string', 'AnsiString', 'WideString', 'ShortString', 'Char', 'WideChar', 'AnsiChar']);
|
'string', 'AnsiString', 'WideString', 'ShortString', 'Char', 'WideChar', 'AnsiChar']);
|
||||||
end;
|
|
||||||
Result := FStringTypesOrderList;
|
Result := FStringTypesOrderList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1426,6 +1420,17 @@ end;
|
|||||||
|
|
||||||
{ TTypeAliasOrderList }
|
{ TTypeAliasOrderList }
|
||||||
|
|
||||||
|
constructor TTypeAliasOrderList.Create(const AliasNames: array of string);
|
||||||
|
var
|
||||||
|
I: Integer;
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
|
||||||
|
SetLength(FList, Length(AliasNames));
|
||||||
|
for I := Low(AliasNames) to High(AliasNames) do
|
||||||
|
FList[I] := AliasNames[I];
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTypeAliasOrderList.Add(const AliasNames: array of string);
|
procedure TTypeAliasOrderList.Add(const AliasNames: array of string);
|
||||||
var
|
var
|
||||||
S: string;
|
S: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user