mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
Inline methods inside classes unit protected by {$ifdef classesinline}
git-svn-id: trunk@10945 -
This commit is contained in:
parent
77e5bf78ab
commit
028c6d9042
@ -663,7 +663,7 @@ end;
|
|||||||
|
|
||||||
Function FindNestedComponent(Root : TComponent; APath : String; CStyle : Boolean = True) : TComponent;
|
Function FindNestedComponent(Root : TComponent; APath : String; CStyle : Boolean = True) : TComponent;
|
||||||
|
|
||||||
Function GetNextName : String; inline;
|
Function GetNextName : String; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
|
|
||||||
Var
|
Var
|
||||||
P : Integer;
|
P : Integer;
|
||||||
|
@ -1316,13 +1316,13 @@ type
|
|||||||
fLastTokenWStr : widestring;
|
fLastTokenWStr : widestring;
|
||||||
function GetTokenName(aTok : char) : string;
|
function GetTokenName(aTok : char) : string;
|
||||||
procedure LoadBuffer;
|
procedure LoadBuffer;
|
||||||
procedure CheckLoadBuffer; inline;
|
procedure CheckLoadBuffer; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
procedure ProcessChar; inline;
|
procedure ProcessChar; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
function IsNumber : boolean; inline;
|
function IsNumber : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
function IsHexNum : boolean; inline;
|
function IsHexNum : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
function IsAlpha : boolean; inline;
|
function IsAlpha : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
function IsAlphaNum : boolean; inline;
|
function IsAlphaNum : boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
function GetHexValue(c : char) : byte; inline;
|
function GetHexValue(c : char) : byte; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
function GetAlphaNum : string;
|
function GetAlphaNum : string;
|
||||||
procedure HandleNewLine;
|
procedure HandleNewLine;
|
||||||
procedure SkipSpaces;
|
procedure SkipSpaces;
|
||||||
|
@ -53,39 +53,39 @@ begin
|
|||||||
fBufLen:=toread;
|
fBufLen:=toread;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TParser.CheckLoadBuffer; inline;
|
procedure TParser.CheckLoadBuffer; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
begin
|
begin
|
||||||
if fBuf[fPos]=#0 then LoadBuffer;
|
if fBuf[fPos]=#0 then LoadBuffer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TParser.ProcessChar; inline;
|
procedure TParser.ProcessChar; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
begin
|
begin
|
||||||
fLastTokenStr:=fLastTokenStr+fBuf[fPos];
|
fLastTokenStr:=fLastTokenStr+fBuf[fPos];
|
||||||
inc(fPos);
|
inc(fPos);
|
||||||
CheckLoadBuffer;
|
CheckLoadBuffer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TParser.IsNumber: boolean; inline;
|
function TParser.IsNumber: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
begin
|
begin
|
||||||
Result:=fBuf[fPos] in ['0'..'9'];
|
Result:=fBuf[fPos] in ['0'..'9'];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TParser.IsHexNum: boolean; inline;
|
function TParser.IsHexNum: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
begin
|
begin
|
||||||
Result:=fBuf[fPos] in ['0'..'9','A'..'F','a'..'f'];
|
Result:=fBuf[fPos] in ['0'..'9','A'..'F','a'..'f'];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TParser.IsAlpha: boolean; inline;
|
function TParser.IsAlpha: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
begin
|
begin
|
||||||
Result:=fBuf[fPos] in ['_','A'..'Z','a'..'z'];
|
Result:=fBuf[fPos] in ['_','A'..'Z','a'..'z'];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TParser.IsAlphaNum: boolean; inline;
|
function TParser.IsAlphaNum: boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
begin
|
begin
|
||||||
Result:=IsAlpha or IsNumber;
|
Result:=IsAlpha or IsNumber;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TParser.GetHexValue(c: char): byte; inline;
|
function TParser.GetHexValue(c: char): byte; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
begin
|
begin
|
||||||
case c of
|
case c of
|
||||||
'0'..'9' : Result:=ord(c)-$30;
|
'0'..'9' : Result:=ord(c)-$30;
|
||||||
|
@ -12,8 +12,8 @@ type
|
|||||||
FGlobal, // Global component.
|
FGlobal, // Global component.
|
||||||
FRelative : string; // Path relative to global component.
|
FRelative : string; // Path relative to global component.
|
||||||
Function Resolve(Instance : TPersistent) : Boolean; // Resolve this reference
|
Function Resolve(Instance : TPersistent) : Boolean; // Resolve this reference
|
||||||
Function RootMatches(ARoot : TComponent) : Boolean; Inline; // True if Froot matches or ARoot is nil.
|
Function RootMatches(ARoot : TComponent) : Boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE} // True if Froot matches or ARoot is nil.
|
||||||
Function NextRef : TUnresolvedReference; inline;
|
Function NextRef : TUnresolvedReference; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TLocalUnResolvedReference = class(TUnresolvedReference)
|
TLocalUnResolvedReference = class(TUnresolvedReference)
|
||||||
@ -29,7 +29,7 @@ type
|
|||||||
FUnresolved : TLinkedList; // The list
|
FUnresolved : TLinkedList; // The list
|
||||||
Destructor Destroy; override;
|
Destructor Destroy; override;
|
||||||
Function AddReference(ARoot : TComponent; APropInfo : PPropInfo; AGlobal,ARelative : String) : TUnresolvedReference;
|
Function AddReference(ARoot : TComponent; APropInfo : PPropInfo; AGlobal,ARelative : String) : TUnresolvedReference;
|
||||||
Function RootUnresolved : TUnresolvedReference; inline; // Return root element in list.
|
Function RootUnresolved : TUnresolvedReference; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE} // Return root element in list.
|
||||||
Function ResolveReferences : Boolean; // Return true if all unresolveds were resolved.
|
Function ResolveReferences : Boolean; // Return true if all unresolveds were resolved.
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TUnresolvedReference.RootMatches(ARoot : TComponent) : Boolean; Inline;
|
Function TUnresolvedReference.RootMatches(ARoot : TComponent) : Boolean; {$ifdef CLASSESINLINE} inline; {$endif CLASSESINLINE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=(ARoot=Nil) or (ARoot=FRoot);
|
Result:=(ARoot=Nil) or (ARoot=FRoot);
|
||||||
|
Loading…
Reference in New Issue
Block a user