<html> | |
<head> | |
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>NewStatement</title> | |
<link href="book.css" rel="stylesheet" type="text/css"> | |
<meta content="DocBook XSL Stylesheets V1.75.1" name="generator"> | |
<link rel="home" href="index.html" title="QVT Declarative Documentation"> | |
<link rel="up" href="qvtimperative.html" title="qvtimperative"> | |
<link rel="prev" href="MappingStatement.html" title="MappingStatement"> | |
<link rel="next" href="ObservableStatement.html" title="ObservableStatement"> | |
</head> | |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> | |
NewStatement | |
</h1> | |
<div class="section" title="NewStatement"> | |
<div class="titlepage"> | |
<div> | |
<div> | |
<h2 class="title" style="clear: both"> | |
<a name="NewStatement"></a> | |
<span class="bold"><strong> | |
<code class="code">NewStatement</code> | |
</strong></span> | |
</h2> | |
</div> | |
</div> | |
</div> | |
<p>A NewStatement creates an instance of a class and binds a name to it.</p> | |
<p>syntax: | |
<code class="code">new:typedModel name : type := expression;</code> | |
</p> | |
<p>If expression is omitted, a new instance if the tyope is created. If expression is provided, it | |
computes the ‘new’ object, typically a singlton supervisor fpr a QVTr key.</p> | |
<p>conformsTo | |
<a class="link" href="VariableStatement.html" title="VariableStatement"> | |
<code class="code">VariableStatement</code> | |
</a>, | |
<a class="link" href="ObservableStatement.html" title="ObservableStatement"> | |
<code class="code">ObservableStatement</code> | |
</a> | |
</p> | |
<p> | |
<span class="bold"><strong>Associations</strong></span> | |
</p> | |
<p> | |
<code class="code">ownedExpression : OCLExpression[?]</code> | |
</p> | |
<p>Optional expression that constructs the new object.</p> | |
<p> | |
<code class="code">referredTypedModel : ::ImperativeTypedModel[1]</code> | |
</p> | |
<p>The TypedModel to which the new object is added.</p> | |
</div> | |
</body> | |
</html> |