mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:09:23 +02:00
* the TOmfLibDictionaryEntry class in unit owomflib converted to two identical
nested classes inside TOmfLibObjectWriter and TOmfLibObjectReader. The reason is I'm planning to change the class, used in TOmfLibObjectWriter, but not the one in TOmfLibObjectReader. And using nested classes keeps things clean and avoids exposing implementation details in the interface of the owomflib unit. * also changed 'private' to 'strict private' in the classes of the owomflib to reduce the risk of interference between TOmfLibObjectWriter and TOmfLibObjectReader. git-svn-id: trunk@39191 -
This commit is contained in:
parent
29bb418fe0
commit
af5e6e182d
@ -35,20 +35,22 @@ uses
|
||||
|
||||
type
|
||||
|
||||
{ TOmfLibDictionaryEntry }
|
||||
|
||||
TOmfLibDictionaryEntry=class(TFPHashObject)
|
||||
private
|
||||
FPageNum: Word;
|
||||
public
|
||||
constructor Create(HashObjectList:TFPHashObjectList;const aName:TSymStr;aPageNum:Word);
|
||||
property PageNum: Word read FPageNum write FPageNum;
|
||||
end;
|
||||
|
||||
{ TOmfLibObjectWriter }
|
||||
|
||||
TOmfLibObjectWriter=class(TObjectWriter)
|
||||
private
|
||||
strict private
|
||||
type
|
||||
|
||||
{ TOmfLibDictionaryEntry }
|
||||
|
||||
TOmfLibDictionaryEntry=class(TFPHashObject)
|
||||
strict private
|
||||
FPageNum: Word;
|
||||
public
|
||||
constructor Create(HashObjectList:TFPHashObjectList;const aName:TSymStr;aPageNum:Word);
|
||||
property PageNum: Word read FPageNum write FPageNum;
|
||||
end;
|
||||
strict private
|
||||
FPageSize: Integer;
|
||||
FLibName: string;
|
||||
FLibData: TDynamicArray;
|
||||
@ -75,7 +77,19 @@ type
|
||||
{ TOmfLibObjectReader }
|
||||
|
||||
TOmfLibObjectReader=class(TObjectReader)
|
||||
private
|
||||
strict private
|
||||
type
|
||||
|
||||
{ TOmfLibDictionaryEntry }
|
||||
|
||||
TOmfLibDictionaryEntry=class(TFPHashObject)
|
||||
strict private
|
||||
FPageNum: Word;
|
||||
public
|
||||
constructor Create(HashObjectList:TFPHashObjectList;const aName:TSymStr;aPageNum:Word);
|
||||
property PageNum: Word read FPageNum write FPageNum;
|
||||
end;
|
||||
strict private
|
||||
LibSymbols : TFPHashObjectList;
|
||||
islib: boolean;
|
||||
CurrMemberPos : longint;
|
||||
@ -122,10 +136,11 @@ implementation
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
TOmfLibDictionaryEntry
|
||||
TOmfLibObjectWriter.TOmfLibDictionaryEntry
|
||||
*****************************************************************************}
|
||||
|
||||
constructor TOmfLibDictionaryEntry.Create(HashObjectList: TFPHashObjectList; const aName: TSymStr; aPageNum: Word);
|
||||
constructor TOmfLibObjectWriter.TOmfLibDictionaryEntry.Create(
|
||||
HashObjectList: TFPHashObjectList; const aName: TSymStr; aPageNum: Word);
|
||||
begin
|
||||
inherited Create(HashObjectList,aName);
|
||||
PageNum:=aPageNum;
|
||||
@ -353,6 +368,17 @@ implementation
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
TOmfLibObjectReader.TOmfLibDictionaryEntry
|
||||
*****************************************************************************}
|
||||
|
||||
constructor TOmfLibObjectReader.TOmfLibDictionaryEntry.Create(
|
||||
HashObjectList: TFPHashObjectList; const aName: TSymStr; aPageNum: Word);
|
||||
begin
|
||||
inherited Create(HashObjectList,aName);
|
||||
PageNum:=aPageNum;
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
TOmfLibObjectReader
|
||||
*****************************************************************************}
|
||||
|
Loading…
Reference in New Issue
Block a user