Class TCasScriptParameterValue
Unit
Declaration
type TCasScriptParameterValue = class(TCasScriptValue)
Description
This is a very special CastleScript value, used to represent user-defined function parameter. This poses itself as a TCasScriptValue descendant, and it has working AssignValue and everything else. This way it can be used in "Variables" list for various CastleScriptParser functions.
Except it's cheating: it doesn't actually store the value. Instead, it has SourceValue property that is used when doing AssignValue. So AssignValue is handled by SourceValue.AssignValue, and Execute is handled by SourceValue.Execute, and so reading/writing this works.
The advantage: the exact type of function parameter is not known, and still we can parse the function expression. This is crucial for parser implementation: when parsing you need to create TCasScriptParameterValue
instance, but you don't know actual type of parameter that will be passed here.
Hierarchy
- TObject
- TCasScriptExpression
- TCasScriptValue
- TCasScriptParameterValue
Overview
Methods
function CoreExecute: TCasScriptValue; override; |
|
procedure AssignValue(Source: TCasScriptValue); override; |
Properties
property SourceValue: TCasScriptValue read FSourceValue write FSourceValue; |
Description
Methods
function CoreExecute: TCasScriptValue; override; |
|
This item has no description. Showing description inherited from TCasScriptExpression.CoreExecute. More internal version of Execute. This doesn't necessarily check floating-point exceptions. Execute actually calls Also this doesn't try to convert EIntError and EMathError to ECasScriptAnyMathError. This is done by Execute. When one CastleScript |
procedure AssignValue(Source: TCasScriptValue); override; |
|
This item has no description. Showing description inherited from TCasScriptValue.AssignValue. Assign value from Source to Self. |
Properties
property SourceValue: TCasScriptValue read FSourceValue write FSourceValue; |
|
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.