1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
4
<title>Castle Game Engine: CastleScript: Class TCasScriptParameterValue</title>
5
<meta name="generator" content="PasDoc 0.12.1">
6
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
7
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
10
<table class="container"><tr><td class="navigation">
11
<h2>Castle Game Engine</h2><p><a href="introduction.html" class="navigation">Introduction</a></p><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
12
<a name="TCasScriptParameterValue"></a><h1 class="cio">Class TCasScriptParameterValue</h1>
13
<table class="sections wide_list">
15
<td><a class="section" href="#PasDoc-Description">Description</a></td><td><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#PasDoc-Methods">Methods</a></td><td><a class="section" href="#PasDoc-Properties">Properties</a></td></tr></table>
16
<a name="PasDoc-Description"></a><h2 class="unit">Unit</h2>
18
<a href="CastleScript.html">CastleScript</a></p>
19
<h2 class="declaration">Declaration</h2>
20
<p class="declaration">
21
<code>type TCasScriptParameterValue = class(<a class="normal" href="CastleScript.TCasScriptValue.html">TCasScriptValue</a>)</code></p>
22
<h2 class="description">Description</h2>
24
This is a very special <a class="normal" href="CastleScript.html">CastleScript</a> value, used to represent user-defined function parameter. This poses itself as a <a class="normal" href="CastleScript.TCasScriptValue.html">TCasScriptValue</a> descendant, and it has working <a class="normal" href="CastleScript.TCasScriptParameterValue.html#AssignValue">AssignValue</a> and everything else. This way it can be used in "Variables" list for various <a class="normal" href="CastleScriptParser.html">CastleScriptParser</a> functions.
26
<p>Except it's cheating: it doesn't actually store the value. Instead, it has <a class="normal" href="CastleScript.TCasScriptParameterValue.html#SourceValue">SourceValue</a> property that is used when doing <a class="normal" href="CastleScript.TCasScriptParameterValue.html#AssignValue">AssignValue</a>. So <a class="normal" href="CastleScript.TCasScriptParameterValue.html#AssignValue">AssignValue</a> is handled by SourceValue.AssignValue, and Execute is handled by SourceValue.Execute, and so reading/writing this works.
28
<p>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 <code>TCasScriptParameterValue</code> instance, but you don't know actual type of parameter that will be passed here.</p>
29
<a name="PasDoc-Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
30
<ul class="hierarchy"><li class="ancestor">TObject</li>
31
<li class="ancestor"><a class="normal" href="CastleScript.TCasScriptExpression.html">TCasScriptExpression</a></li>
32
<li class="ancestor"><a class="normal" href="CastleScript.TCasScriptValue.html">TCasScriptValue</a></li>
33
<li class="thisitem">TCasScriptParameterValue</li></ul><h2 class="overview">Overview</h2>
34
<a name="PasDoc-Methods"></a><h3 class="summary">Methods</h3>
35
<table class="summary wide_list">
37
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
38
<td class="itemcode"><code>procedure <b><a href="CastleScript.TCasScriptParameterValue.html#AssignValue">AssignValue</a></b>(Source: <a href="CastleScript.TCasScriptValue.html">TCasScriptValue</a>); override;</code></td>
41
<a name="PasDoc-Properties"></a><h3 class="summary">Properties</h3>
42
<table class="summary wide_list">
44
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
45
<td class="itemcode"><code>property <b><a href="CastleScript.TCasScriptParameterValue.html#SourceValue">SourceValue</a></b>: <a href="CastleScript.TCasScriptValue.html">TCasScriptValue</a> read FSourceValue write FSourceValue;</code></td>
48
<h2 class="description">Description</h2>
49
<h3 class="detail">Methods</h3>
50
<table class="detail wide_list">
52
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
53
<td class="itemcode"><a name="AssignValue"></a><code>procedure <b>AssignValue</b>(Source: <a href="CastleScript.TCasScriptValue.html">TCasScriptValue</a>); override;</code></td>
58
<h3 class="detail">Properties</h3>
59
<table class="detail wide_list">
61
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
62
<td class="itemcode"><a name="SourceValue"></a><code>property <b>SourceValue</b>: <a href="CastleScript.TCasScriptValue.html">TCasScriptValue</a> read FSourceValue write FSourceValue;</code></td>
67
<hr noshade size="1"><span class="appinfo"><em>Generated by <a href="http://pasdoc.sourceforge.net/">PasDoc 0.12.1</a> on 2013-02-04 20:26:52</em>
69
</td></tr></table></body></html>