Commit bd1e73f3 authored by Lenard Nagy's avatar Lenard Nagy
Browse files

Added extends keword to online help


Signed-off-by: Lenard Nagy's avatarLenard Nagy <lenard.nagy@ericsson.com>
parent b1f90f3b
...@@ -877,7 +877,7 @@ This ABNF browser was generated from file &lt;mockup_bnf.txt&gt; on Tue Jul 20 1 ...@@ -877,7 +877,7 @@ This ABNF browser was generated from file &lt;mockup_bnf.txt&gt; on Tue Jul 20 1
<TD> <TD>
<P><A NAME="componentdef"></a><A HREF="#Xref.ComponentDef">ComponentDef</A> <P><A NAME="componentdef"></a><A HREF="#Xref.ComponentDef">ComponentDef</A>
<TD VALIGN=TOP>=</TD> <TD VALIGN=TOP>=</TD>
<TD><A HREF="#componentkeyword">ComponentKeyword</A> <A HREF="#componenttypeidentifier">ComponentTypeIdentifier</A> <A HREF="#beginchar">BeginChar</A> [<A HREF="#componentdeflist">ComponentDefList</A>] <TD><A HREF="#componentkeyword">ComponentKeyword</A> <A HREF="#componenttypeidentifier">ComponentTypeIdentifier</A> [<A HREF="#extendskeyword">ExtendsKeyword</A> <A HREF="#componenttypeidentifier">ComponentTypeIdentifier</A>] <A HREF="#beginchar">BeginChar</A> [<A HREF="#componentdeflist">ComponentDefList</A>]
<A HREF="#endchar">EndChar</A></TD> <A HREF="#endchar">EndChar</A></TD>
</TR> </TR>
<TR VALIGN=TOP> <TR VALIGN=TOP>
...@@ -894,6 +894,16 @@ This ABNF browser was generated from file &lt;mockup_bnf.txt&gt; on Tue Jul 20 1 ...@@ -894,6 +894,16 @@ This ABNF browser was generated from file &lt;mockup_bnf.txt&gt; on Tue Jul 20 1
<TD></TD> <TD></TD>
<TD></TD> <TD></TD>
</TR> </TR>
<TR VALIGN=TOP>
<TD>
<P><A NAME="extendskeyword"></a><A HREF="#Xref.ExtendsKeyword">ExtendsKeyword</A>
<TD VALIGN=TOP>=</TD>
<TD>"<FONT COLOR="black">extends</FONT>"</TD>
</TR>
<TR VALIGN=TOP>
<TD></TD>
<TD></TD>
</TR>
<TR VALIGN=TOP> <TR VALIGN=TOP>
<TD> <TD>
<P><A NAME="componenttype"></a><A HREF="#Xref.ComponentType">ComponentType</A> <P><A NAME="componenttype"></a><A HREF="#Xref.ComponentType">ComponentType</A>
...@@ -5766,6 +5776,10 @@ This ABNF browser was generated from file &lt;mockup_bnf.txt&gt; on Tue Jul 20 1 ...@@ -5766,6 +5776,10 @@ This ABNF browser was generated from file &lt;mockup_bnf.txt&gt; on Tue Jul 20 1
<TD><A NAME="Xref.ExtendedFieldReference"></a><A HREF="#extendedfieldreference">ExtendedFieldReference</A></TD> <TD><A NAME="Xref.ExtendedFieldReference"></a><A HREF="#extendedfieldreference">ExtendedFieldReference</A></TD>
<TD><A HREF="#variableref">VariableRef</A>, <A HREF="#referencedtype">ReferencedType</A>, <A HREF="#referencedvalue">ReferencedValue</A></TD> <TD><A HREF="#variableref">VariableRef</A>, <A HREF="#referencedtype">ReferencedType</A>, <A HREF="#referencedvalue">ReferencedValue</A></TD>
</TR> </TR>
<TR VALIGN=TOP>
<TD><A NAME="Xref.ExtendsKeyword"></a><A HREF="#extendskeyword">ExtendsKeyword</A></TD>
<TD><A HREF="#componentdef">ComponentDef</A></TD>
</TR>
<TR VALIGN=TOP> <TR VALIGN=TOP>
<TD><A NAME="Xref.ExtensionKeyword"></a><A HREF="#extensionkeyword">ExtensionKeyword</A></TD> <TD><A NAME="Xref.ExtensionKeyword"></a><A HREF="#extensionkeyword">ExtensionKeyword</A></TD>
<TD><A HREF="#attribkeyword">AttribKeyword</A></TD> <TD><A HREF="#attribkeyword">AttribKeyword</A></TD>
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<p>Related keywords:</p> <p>Related keywords:</p>
<ul> <ul>
<li><a href="type.html"><b><font face="Courier New" color="#003258" size="4">type</font></b></a></li> <li><a href="type.html"><b><font face="Courier New" color="#003258" size="4">type</font></b></a></li>
<li><a href="extends.html"><b><font face="Courier New" color="#003258" size="4">extends</font></b></a></li>
<li><a href="port.html"><b><font face="Courier New" color="#003258" size="4">port</font></b></a></li> <li><a href="port.html"><b><font face="Courier New" color="#003258" size="4">port</font></b></a></li>
<li><a href="const.html"><b><font face="Courier New" color="#003258" size="4">const</font></b></a></li> <li><a href="const.html"><b><font face="Courier New" color="#003258" size="4">const</font></b></a></li>
<li><a href="var.html"><b><font face="Courier New" color="#003258" size="4">var</font></b></a></li> <li><a href="var.html"><b><font face="Courier New" color="#003258" size="4">var</font></b></a></li>
......
<!--
Copyright (c) 2000-2020 Ericsson Telecom AB
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
Contributors:
Baji, Laszlo
Balasko, Jeno
Farkas, Laszlo
Szabados, Kristof
Lenard, Nagy
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<title>extends</title>
</head>
<body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258">
<table align="left" border="0" cellspacing="0" cellpadding="0" valign=top>
<tr>
<td width=105 height=40><a href="https://projects.eclipse.org/projects/tools.titan"><img src="../images/titan_transparent.gif" border=0 width=105 height=40 align="left" alt="Titan"></a></td>
</tr>
</table>
<table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td>
<td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td>
<td><a href="complement.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
<td><a href="connect.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td>
</tr>
</table>
<p><br clear="all">
</p>
<hr>
<h1>extends</h1>
<hr align="left" width="75%">
<p>The keyword is used to specify the parent component type on which the new component type is based.</p>
<p>In such a definition, the new type definition is referred to as the extended type, and the type definition following the
extends keyword is referred to as the parent type. The effect of this definition is that the extended type will implicitly
also contain all definitions from the parent type. It is called the effective type definition.</p>
<p> It is allowed to have one component type extending several parent types in one definition, which have to be specified as
a comma-separated list of types in the definition. Any of the parent types may also be defined by means of extension.
The effective component type definition of the extended type is obtained as the collection of all constant, variable,
template, timer and port definitions contributed by the parent types (determined recursively if a parent type is also
defined by means of an extension) and the definitions declared in the extended type directly. The effective component
type definition shall be name clash free.</p>
<p>Related keywords:</p>
<ul>
<li><a href="type.html"><b><font face="Courier New" color="#003258" size="4">type</font></b></a></li>
<li><a href="component.html"><b><font face="Courier New" color="#003258" size="4">component</font></b></a></li>
</ul>
<hr align="left" width="50%">
<div align="center">
<center>
<table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
<tr>
<td width="100%">
<h3 align="center"><font face="Courier New" color="#003258" size="5"><b>type component </b></font> <i>component_identifier </i> <font face="Courier New" color="#003258" size="5"><b>extends</b></font> <i>parent_component_type_identifier</i> <font face="Courier New" color="#003258" size="5"><b>{</b></font>
[ <i>port_instance</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp; [ <i>const_def</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp; [ <i>var_instance</i><font
face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp; [ <i>timer_instance</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ] <font face="Courier New"
color="#003258" size="5"><b>};</b></font></h3>
</td>
</tr>
</table>
</center>
</div>
<ul>
<li>
<p>The <i>parent_component_type_identifier</i> specifies the component type to be extended</p>
</li>
</ul>
<p></p>
<hr align="left" width="50%">
<p>Example 1:
<p><font face="Courier New">type component MyParentComponentType_CT {<br>
&nbsp;&nbsp;&nbsp;port MyMessagePortType_PT P1_PCO;<br>
&nbsp;&nbsp;&nbsp;const bitstring c_MyConst := ’1001’B;&nbsp;<br>
&nbsp;&nbsp;&nbsp;var integer v_MyVar;&nbsp;<br>
&nbsp;&nbsp;&nbsp;timer T_MyTimer := 1.0;&nbsp;<br>
}
</p>
<p><font face="Courier New">type component MyExtendedComponentType_CT extends MyParentComponentType_CT {<br>
&nbsp;&nbsp;&nbsp;port MyOtherMessagePortType_PT P2_PCO;<br>
&nbsp;&nbsp;&nbsp;const bitstring c_MyOtherConst := ’0110’B;&nbsp;<br>
&nbsp;&nbsp;&nbsp;var integer v_MyOtherVar;&nbsp;<br>
&nbsp;&nbsp;&nbsp;timer T_MyOtherTimer := 2.0;&nbsp;<br>
}
</p>
</font>
<p>The component called MyExtendedComponentType_CT is declared by extending MyParentComponentType_CT.&nbsp;<br>
The resulting extended component contains two ports (P1_PCO,P2_PCO) of type MyMessagePortType_PT,&nbsp;<br>
two constants called c_MyConst and c_MyOtherConst,&nbsp;<br>
two variables called v_MyVar and v_MyOtherVar&nbsp;<br>
and two timers called T_MyTimer and T_MyOtherTimer.</p>
<hr align="left" width="25%">
<hr align="left" width="25%">
<p><a HREF="BNF.html#componentdef">BNF definition</a> of <font face="Courier New"> extends</font></p>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment