Class TCasScriptParameterValue

DescriptionHierarchyFieldsMethodsProperties

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

Overview

Methods

Public procedure AssignValue(Source: TCasScriptValue); override;

Properties

Public property SourceValue: TCasScriptValue read FSourceValue write FSourceValue;

Description

Methods

Public procedure AssignValue(Source: TCasScriptValue); override;
 

Properties

Public property SourceValue: TCasScriptValue read FSourceValue write FSourceValue;
 

Generated by PasDoc 0.12.1 on 2013-02-04 20:26:52