Refactoring streams and fixin various bugs
This commit is contained in:
@@ -45,6 +45,8 @@ type
|
||||
class function Intern(const AName: string): IKeyword; static;
|
||||
// Gets the name for a given keyword index.
|
||||
class function GetName(AIdx: Integer): string; static;
|
||||
// Gets the keyword for a given keyword index.
|
||||
class function GetKeyword(AIdx: Integer): IKeyword; static;
|
||||
end;
|
||||
|
||||
// Defines a mapping from Keywords to a generic value T
|
||||
@@ -144,6 +146,11 @@ begin
|
||||
FReverseMap.Free;
|
||||
end;
|
||||
|
||||
class function TKeywordRegistry.GetKeyword(AIdx: Integer): IKeyword;
|
||||
begin
|
||||
Result := FReverseMap[AIdx];
|
||||
end;
|
||||
|
||||
class function TKeywordRegistry.Intern(const AName: string): IKeyword;
|
||||
var
|
||||
idx: Integer;
|
||||
|
||||
Reference in New Issue
Block a user