mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-11 10:18:37 +02:00
IDE: started conditional evaluation
git-svn-id: trunk@17866 -
This commit is contained in:
parent
3817032fa7
commit
20fee49b9d
@ -135,6 +135,9 @@ type
|
|||||||
FChangeStamp: integer;
|
FChangeStamp: integer;
|
||||||
FEvaluator: TExpressionEvaluator;
|
FEvaluator: TExpressionEvaluator;
|
||||||
FRoot: TCompOptCondNode;
|
FRoot: TCompOptCondNode;
|
||||||
|
FEvaluatorStamp: integer;
|
||||||
|
FValuesValid: boolean;
|
||||||
|
FValues: array[TCOCValueType] of string;
|
||||||
function GetValues(const ValueType: TCOCValueType): string;
|
function GetValues(const ValueType: TCOCValueType): string;
|
||||||
procedure SetEvaluator(const AValue: TExpressionEvaluator);
|
procedure SetEvaluator(const AValue: TExpressionEvaluator);
|
||||||
public
|
public
|
||||||
@ -312,7 +315,13 @@ end;
|
|||||||
|
|
||||||
function TCompOptConditionals.GetValues(const ValueType: TCOCValueType): string;
|
function TCompOptConditionals.GetValues(const ValueType: TCOCValueType): string;
|
||||||
begin
|
begin
|
||||||
|
if (not FValuesValid)
|
||||||
|
or (FEvaluator.ChangeStamp<>FEvaluatorStamp) then begin
|
||||||
|
// ToDo
|
||||||
|
FValuesValid:=true;
|
||||||
|
FEvaluatorStamp:=FEvaluator.ChangeStamp;
|
||||||
|
end;
|
||||||
|
Result:=FValues[ValueType];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompOptConditionals.SetEvaluator(const AValue: TExpressionEvaluator
|
procedure TCompOptConditionals.SetEvaluator(const AValue: TExpressionEvaluator
|
||||||
@ -320,6 +329,7 @@ procedure TCompOptConditionals.SetEvaluator(const AValue: TExpressionEvaluator
|
|||||||
begin
|
begin
|
||||||
if FEvaluator=AValue then exit;
|
if FEvaluator=AValue then exit;
|
||||||
FEvaluator:=AValue;
|
FEvaluator:=AValue;
|
||||||
|
FValuesValid:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TCompOptConditionals.Create;
|
constructor TCompOptConditionals.Create;
|
||||||
|
Loading…
Reference in New Issue
Block a user