2 Copyright (c) 2000-2015 Ericsson Telecom AB
4 All rights reserved. This program and the accompanying materials
5 are made available under the terms of the Eclipse Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/epl-v10.html
11 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
12 <meta http-equiv=
"Content-Language" content=
"en-us">
15 <body bgcolor=
"#DAD3C5" vlink=
"#0094D2" link=
"#003258">
16 <table align=
"left" border=
"0" cellspacing=
"0" cellpadding=
"0" valign=top
>
18 <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>
21 <table border=
"0" align=
"right" cellpadding=
"0" cellspacing=
"0">
23 <td><a href=
"../titan_main.html" alt=
"contents"><img border=
"0" src=
"../images/ao.jpg" width=
"53" height=
"40"></a></td>
24 <td><a href=
"../titan_index.html" alt=
"index"><img border=
"0" src=
"../images/up.jpg" width=
"53" height=
"40"></a></td>
25 <td><a href=
"ifpresent.html" alt=
"previous"><img border=
"0" src=
"../images/left.jpg" width=
"53" height=
"40"></a></td>
26 <td><a href=
"in.html" alt=
"next"><img border=
"0" src=
"../images/right.jpg" width=
"53" height=
"40"></a></td>
33 <hr align=
"left" width=
"75%">
34 <p>The statement makes it possible to
<a href=
"#selective"> reuse all
</a> or
<a href=
"#selective">some of the definitions
</a> specified in the module definitions part of a different module.
</p>
36 <li><a name=
"stop_all">The
</a> keyword
<a href=
"objid.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">objid
</font></b></a> is optionally used when the source
<a href=
"#timer_start">module
37 has an object identifier
</a>.
</li>
38 <li><a name=
"stop_all">The
</a> keyword
<a href=
"language.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">language
</font></b></a> is used when importing
<a href=
"#default">from a
39 non-TTCN-
3 module
</a>.
</li>
40 <li><a name=
"stop_all">The
</a> keyword
<a href=
"except.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">except
</font></b></a> is used when there is a need
<a href=
"#default">to
41 exclude some of the definitions
</a> from the import.
</li>
43 <p>The keyword
<a href=
"recursive.html"><font face=
"Courier New" size=
"4"><b>recursive
</b></font> </a> means that every definition required by the specified definitions must also be imported. It
44 can only be used with selective import.
</p>
47 <p>Related keywords:
</p>
49 <li><a href=
"all.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">all
</font></b></a></li>
50 <li><a href=
"except.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">except
</font></b></a></li>
51 <li><a href=
"from.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">from
</font></b></a></li>
52 <li><a href=
"language.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">language
</font></b></a></li>
53 <li><a href=
"language.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">objid
</font></b></a></li>
55 <hr align=
"left" width=
"50%">
56 <p>1.
<a name=
"timer">Importing everything from a module
</a></p>
59 <table border=
"0" width=
"90%" bgcolor=
"#FFB599" cellpadding=
"4">
62 <h3 align=
"center"><font face=
"Courier New" color=
"#003258" size=
"5"><b>import from
</b></font><i>module_identifier
</i> [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>.objid(
</b></font><i>object_identifier
</i><font
63 face=
"Courier New" color=
"#003258" size=
"5"><b>)
</b></font> ] [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>language
"</b></font><i>language_identifier
</i><font face=
"Courier New"
64 color=
"#003258" size=
"5"><b>"</b></font> ]
<font face=
"Courier New" color=
"#003258" size=
"5"><b>all;
</b></font></h3>
72 <p><font face=
"Courier New" size=
"4"><b>import from
</b></font> is a keyword of two parts, they together introduce the import definition.
</p>
75 <p><i>module_identifier
</i> is the
name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore
79 <table border=
"0" width=
"100%" bgcolor=
"#C9C2BB" cellpadding=
"4">
83 <p><u>TITAN specific restriction compared to the standard:
</u></p>
87 <p> <font face=
"Courier New" size=
"4"><b>objid(
</b></font><i>object_identifier
</i><font face=
"Courier New" size=
"4"><b>)
</b></font> is not implemented. When encountered in the TTCN-
3
88 program, it will be discarded without evaluation.
</p>
96 <p><font face=
"Courier New" size=
"4"><b>language
</b></font><font face=
"Courier New" color=
"#003258" size=
"5"><b>"</b></font><i>language_identifier
</i><font face=
"Courier New"
97 color=
"#003258" size=
"5"><b>"</b></font> is used when definitions are imported from sources other than TTCN-
3 modules to denote the language (=
<i>language_identifier
</i>) of that source.
</p>
100 <p><font face=
"Courier New" size=
"4"><b>all
</b></font> means that every definition must be imported from the source.
</p>
103 <hr align=
"left" width=
"50%">
104 <p><a name=
"timer_start">Example
1a
</a>:
105 <p><font face=
"Courier New">import from Ce_mod all;
<br>
107 <p>All definitions from the module Ce_mod will be imported.
</p>
108 <hr align=
"left" width=
"50%">
109 <p><a name=
"timer_start">Example
1b
</a>:
110 <p><font face=
"Courier New">import from Ia_mod.objid{
0 4 0 127 5 0} all;
<br>
112 <p>All definitions will be imported from the module Ia_mod with the object identifier
0.4.0.127.5.0 in the module name.
</p>
113 <hr align=
"left" width=
"50%">
114 <p><a name=
"default">Example
1c:
</a>
115 <p><font face=
"Courier New">import from Muj_mod language
"ASN
.1:
2002" all;
<br>
117 <p>All definitions from the module Muj_mod written in the
2002 version of ASN
.1 will be imported.
</p>
118 <hr align=
"left" width=
"75%">
119 <p>2.
<a name=
"selective">Selective import
</a></p>
120 <table border=
"0" width=
"100%" bgcolor=
"#C9C2BB" cellpadding=
"4">
124 <p><u>TITAN specific restriction compared to the standard:
</u></p>
126 <p> Selective import is not implemented. When encountered in the TTCN-
3 program, it will be treated as a statement for importing all definitions.
</p>
133 <table border=
"0" width=
"90%" bgcolor=
"#FFB599" cellpadding=
"4">
136 <h3 align=
"center"><font face=
"Courier New" color=
"#003258" size=
"5"><b>import from
</b></font><i>module_identifier
</i> [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>.objid(
</b></font><i>object_identifier
</i><font
137 face=
"Courier New" color=
"#003258" size=
"5"><b>)
</b></font> ] [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>language
"</b></font><i>language_identifier
</i><font face=
"Courier New"
138 color=
"#003258" size=
"5"><b>"</b></font> ]
<font face=
"Courier New" color=
"#003258" size=
"5"><b>all except {
</b></font><i>exception_list
</i><font face=
"Courier New" color=
"#003258" size=
"5"><b>};
</b></font>
147 <p><font face=
"Courier New" size=
"4"><b>import from
</b></font> is a keyword of two parts, they together introduce the import definition.
</p>
150 <p><i>module_identifier
</i> is the
name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore
154 <table border=
"0" width=
"100%" bgcolor=
"#C9C2BB" cellpadding=
"4">
158 <p><u>TITAN specific restriction compared to the standard:
</u></p>
162 <p> <font face=
"Courier New" size=
"4"><b>objid(
</b></font><i>object_identifier
</i><font face=
"Courier New" size=
"4"><b>)
</b></font> is not implemented. When encountered in the TTCN-
3
163 program, it will be discarded without evaluation.
</p>
171 <p><font face=
"Courier New" size=
"4"><b>language
</b></font><font face=
"Courier New" color=
"#003258" size=
"5"><b> "</b></font><i>language_identifier
</i><font face=
"Courier New"
172 color=
"#003258" size=
"5"><b>"</b></font> is used when definitions are imported from sources other than TTCN-
3 modules to denote the language (=
<i>language_identifier
</i>) of that source.
</p>
175 <p><font face=
"Courier New" size=
"4"><b>all
</b></font> means that every definition must be imported from the source.
</p>
177 <li><font face=
"Courier New" size=
"4"><b>except
</b></font><font face=
"Courier New" color=
"#003258" size=
"5"><b> {
</b></font><i>exception_list
</i><font face=
"Courier New" color=
"#003258"
178 size=
"5"><b>}
</b></font> is used to exclude some of the definitions of the source module.
<br>
179 <i>exception_list
</i> may contain one of the following definitions:
modulepar | const | type | signature | template | function | altstep | testcase | group.
<br>
180 It is possible to list several restrictions of the same type separated by comma and enumerate several types of restrictions separated by semicolon..
</li>
182 <hr align=
"left" width=
"50%">
183 <p><a name=
"except">Example
2a:
</a>
184 <p><font face=
"Courier New">import from Min_mod all except {testcase tc_one, tc_deux; function f_tre()};
<br>
186 <p>All definitions from the module Min_mod will be imported except the test cases tc_one and
tc_deux as well as the function f_tre().
</p>
187 <hr align=
"left" width=
"50%" color=
"#0094D2">
190 <table border=
"0" width=
"90%" bgcolor=
"#FFB599" cellpadding=
"4">
193 <h3 align=
"center"><font face=
"Courier New" color=
"#003258" size=
"5"><b>import from
</b></font><i>module_identifier
</i> [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>.objid(
</b></font><i>object_identifier
</i><font
194 face=
"Courier New" color=
"#003258" size=
"5"><b>)
</b></font> ] [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>language
"</b></font><i>language_identifier
</i><font face=
"Courier New"
195 color=
"#003258" size=
"5"><b>"</b></font> ]
[
<font face=
"Courier New" color=
"#003258" size=
"5"><b>recursive
</b></font> ]
<font face=
"Courier New" color=
"#003258" size=
"5"><b>
196 {
</b></font><i>importation_list
</i><font face=
"Courier New" color=
"#003258" size=
"5"><b>};
</b></font></h3>
204 <p><font face=
"Courier New" size=
"4"><b>import from
</b></font> is a keyword of two parts, they together introduce the import definition.
</p>
207 <p><i>module_identifier
</i> is the
name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore
211 <table border=
"0" width=
"100%" bgcolor=
"#C9C2BB" cellpadding=
"4">
215 <p><u>TITAN specific restriction compared to the standard:
</u></p>
219 <p> <font face=
"Courier New" size=
"4"><b>objid(
</b></font><i>object_identifier
</i><font face=
"Courier New" size=
"4"><b>)
</b></font> is not implemented. When encountered in the TTCN-
3
220 program, it will be discarded without evaluation.
</p>
228 <p><font face=
"Courier New" size=
"4"><b>language
</b></font><font face=
"Courier New" color=
"#003258" size=
"5"><b> "</b></font><i>language_identifier
</i><font face=
"Courier New"
229 color=
"#003258" size=
"5"><b>"</b></font> is used when definitions are imported from sources other than TTCN-
3 modules to denote the language (=
<i>language_identifier
</i>) of that source.
</p>
232 <p><font face=
"Courier New" size=
"4"><b>recursive
</b></font> means that every definition required by the specified definitions must also be imported.
</p>
234 <li><i>importation_list
</i> is used to enumerate the definitions of the source module to be imported.
<br>
235 It may contain one of the following definitions:
modulepar | const | type | signature | template | function | altstep | testcase | group.
<br>
236 It is possible to list several definitions of the same type separated by comma and enumerate several types of definitions separated by semicolon..
</li>
238 <hr align=
"left" width=
"50%">
239 <p><a name=
"list">Example
2b:
</a>
240 <p><font face=
"Courier New">import from Mon_Mod {const c_derde, c_fjaerde; var v_cinquieme; template all};
</font>
241 <p>The constants c_derde and c_fjaerde as well as the variable v_cinquieme together with all templates will be imported from the module Mon_mod.
</p>
242 <hr align=
"left" width=
"50%">
243 <p><a name=
"recursive">Example
2c:
</a>
244 <p><font face=
"Courier New">import from Mon_Mod recursive {const c_hetedik};
</font>
245 <p>The constant c_hetedik will be imported from the module Mon_mod along with the definitions required by c_hetedik.
</p>
246 <hr align=
"left" width=
"75%">
247 <p>3.
<a name=
"timer">Importing of import statements
</a></p>
250 <table border=
"0" width=
"90%" bgcolor=
"#FFB599" cellpadding=
"4">
253 <h3 align=
"center"><font face=
"Courier New" color=
"#003258" size=
"5"><b>import from
</b></font><i>module_identifier
</i> [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>.objid(
</b></font><i>object_identifier
</i><font
254 face=
"Courier New" color=
"#003258" size=
"5"><b>)
</b></font> ] [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>language
"</b></font><i>language_identifier
</i><font face=
"Courier New"
255 color=
"#003258" size=
"5"><b>"</b></font> ]
<font face=
"Courier New" color=
"#003258" size=
"5"><b>{ import all; }
</b></font></h3>
263 <p><font face=
"Courier New" size=
"4"><b>import from
</b></font> is a keyword of two parts, they together introduce the import definition.
</p>
266 <p><i>module_identifier
</i> is the
name used to refer to the module where the definitions are imported from. It must begin with a letter, may contain letters, numbers and underscore
270 <table border=
"0" width=
"100%" bgcolor=
"#C9C2BB" cellpadding=
"4">
274 <p><u>TITAN specific restriction compared to the standard:
</u></p>
278 <p> <font face=
"Courier New" size=
"4"><b>objid(
</b></font><i>object_identifier
</i><font face=
"Courier New" size=
"4"><b>)
</b></font> is not implemented. When encountered in the TTCN-
3
279 program, it will be discarded without evaluation.
</p>
287 <p><font face=
"Courier New" size=
"4"><b>language
</b></font><font face=
"Courier New" color=
"#003258" size=
"5"><b>"</b></font><i>language_identifier
</i><font face=
"Courier New"
288 color=
"#003258" size=
"5"><b>"</b></font> is used when definitions are imported from sources other than TTCN-
3 modules to denote the language (=
<i>language_identifier
</i>) of that source.
</p>
291 <p><font face=
"Courier New" size=
"4"><b>import all
</b></font> means that every visible
<a href=
"#visible"><sup>*
</sup></a> import statement must be imported from the source.
</p>
294 <hr align=
"left" width=
"50%">
295 <p><a name=
"timer_start">Example
1a
</a>:
296 <p><font face=
"Courier New">import from G_mod { import all };
<br>
298 <p>All visible import statements from the module G_mod will be imported.
299 This has the same effect as if the visible import statements of module G_mod were copied into the importing module.
</p>
300 <hr align=
"left" width=
"75%">
301 <a name=
"visible">Note that the visibility of import statements is by default
<a href=
"private.html">private
</a>.
302 For an import statement to be visible, it must be made
<a href=
"public.html">public
</a>, or the importing module
303 has to be declared as
<a href=
"friend.html">friend
</a> of the module containing the import statement.
</a>
304 <p><a HREF=
"BNF.html#importdef">BNF definition
</a> of
<font face=
"Courier New">import
</font></p>