summaryrefslogtreecommitdiff
path: root/modules/CIAO/docs/tutorials/Quoter/Simple/02.html
blob: 9892e9722c8b616a8959d1da58fad66b3fae3654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!-- $Id$ -->
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:p="urn:schemas-microsoft-com:office:powerpoint"
xmlns:oa="urn:schemas-microsoft-com:office:activation"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="02_files/filelist.xml">
<link rel=Edit-Time-Data href="02_files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Getting Started</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>Abdullah Sowayan</o:Author>
  <o:LastAuthor>Abdullah Sowayan</o:LastAuthor>
  <o:Revision>7</o:Revision>
  <o:TotalTime>88</o:TotalTime>
  <o:Created>2006-10-09T19:28:00Z</o:Created>
  <o:LastSaved>2006-10-09T21:48:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>415</o:Words>
  <o:Characters>2370</o:Characters>
  <o:Company>Maritime Systems &amp; Sensors</o:Company>
  <o:Lines>19</o:Lines>
  <o:Paragraphs>5</o:Paragraphs>
  <o:CharactersWithSpaces>2780</o:CharactersWithSpaces>
  <o:Version>11.8036</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;
	mso-font-charset:2;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:0 268435456 0 0 -2147483648 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
h3
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	mso-outline-level:3;
	font-size:13.5pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:#000FFF;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:#FF0F0F;
	text-decoration:underline;
	text-underline:single;}
address
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";}
code
	{font-family:"Courier New";
	mso-ascii-font-family:"Courier New";
	mso-fareast-font-family:"Times New Roman";
	mso-hansi-font-family:"Courier New";
	mso-bidi-font-family:"Courier New";}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:555236070;
	mso-list-type:hybrid;
	mso-list-template-ids:2061531284 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:1.25in;
	mso-level-number-position:left;
	margin-left:1.25in;
	text-indent:-.25in;
	font-family:Symbol;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
</style>
<![endif]--><!-- 01.html,v 1.3 2006/02/10 14:34:35 mxiong Exp --><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-US link="#000FFF" vlink="#FF0F0F" style='tab-interval:
.5in'>

<div class=Section1>

<h3 align=center style='margin:0in;margin-bottom:.0001pt;text-align:center;
line-height:150%'><span style='color:black'>Step 2: Implement your components<o:p></o:p></span></h3>

<h3 align=center style='text-align:center'><span style='color:black'><img
width=634 height=376 id="_x0000_i1026" src="images/Step2.JPG"><o:p></o:p></span></h3>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='color:black'>Writing
CIDL files:<o:p></o:p></span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:.5in'><b><span style='color:black'>Distributor:<o:p></o:p></span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list 1.25in'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black;mso-bidi-font-weight:bold'><span style='mso-list:Ignore'>&middot;<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:black;mso-bidi-font-weight:
bold'>In <i style='mso-bidi-font-style:normal'>Quoter/Distributor </i>sub-directory,
place a cidl file Distributor.cidl that looks like <a
href="Distributor/Distributor.cidl">this</a>. <o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list 1.25in'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black;mso-bidi-font-weight:bold'><span style='mso-list:Ignore'>&middot;<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:black;mso-bidi-font-weight:
bold'>The MPC files we generated earlier automatically invoked the CIDLC
compiler to generate the Servants, Executors, and Contexts for us. To reduce
the amount of work and typing we need to do, we will next instruct the CIDLC
compiler to generate an empty Distributor Executor implementation (Object
implementation in the figure above). In the <i style='mso-bidi-font-style:normal'>Quoter/Distributor
</i>sub-directory, type the following:<o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.5in'><span style='font-family:"Courier New";color:black;
mso-bidi-font-weight:bold'>cidlc -I$TAO_ROOT -I$TAO_ROOT/tao -I$CIAO_ROOT/ciao
--gen-exec-impl -- Distributor.cidl<o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in'><span style='color:black'>The above command will generate a
<i style='mso-bidi-font-style:normal'>Distributor_exec.h </i>and <i
style='mso-bidi-font-style:normal'>Distributor_exec.cpp </i>files. These
generated files greatly reduced the amount of work we do. We&#8217;ll edit
those files later in the tutorial to insert our business logic in the
Distributor component.<o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in'><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:.5in'><b style='mso-bidi-font-weight:normal'><span
style='color:black'>Broker:<o:p></o:p></span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list 1.25in'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black;mso-bidi-font-weight:bold'><span style='mso-list:Ignore'>&middot;<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:black;mso-bidi-font-weight:
bold'>In <i style='mso-bidi-font-style:normal'>Quoter/Broker </i>sub-directory,
place a cidl file Broker.cidl that looks like <a href="Broker/Broker.cidl">this</a>.
<o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list 1.25in'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black;mso-bidi-font-weight:bold'><span style='mso-list:Ignore'>&middot;<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:black;mso-bidi-font-weight:
bold'>The MPC files we generated earlier automatically invoked the CIDLC
compiler to generate the Servants, Executors, and Contexts for us. To reduce
the amount of work and typing we need to do, we will next instruct the CIDLC
compiler to generate an empty Distributor Executor implementation (Object
implementation in the figure above). In the <i style='mso-bidi-font-style:normal'>Quoter/Broker
</i>sub-directory, type the following:<o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.5in'><span style='font-family:"Courier New";color:black;
mso-bidi-font-weight:bold'>cidlc -I$TAO_ROOT -I$TAO_ROOT/tao -I$CIAO_ROOT/ciao
--gen-exec-impl -- Broker.cidl<o:p></o:p></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in'><span style='color:black'>The above command will generate a
<i style='mso-bidi-font-style:normal'>Broker_exec.h </i>and <i
style='mso-bidi-font-style:normal'>Broker_exec.cpp </i>files. These generated
files greatly reduced the amount of work we do. We&#8217;ll edit those files
later in the tutorial to insert our business logic in the Broker component.<o:p></o:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='color:black'><br>
<b style='mso-bidi-font-weight:normal'>Note:<o:p></o:p></b></span></p>

<p class=MsoNormal style='line-height:150%'><span style='color:black'>To
understand the meaning of different parameters passed to the CIDLC compiler <span
style='mso-bidi-font-style:italic'>type the</span> following command:<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Courier New";
color:black;mso-bidi-font-style:italic'>cidlc --h</span><span style='color:
black'><br>
<br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='color:black'>Implement
the Components:<o:p></o:p></span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:.5in'><b><span style='color:black'>Distributor:<o:p></o:p></span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list 1.25in'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black;mso-bidi-font-weight:bold'><span style='mso-list:Ignore'>&middot;<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:black;mso-bidi-font-weight:
bold'>The CIDLC compiler generated an empty </span><i style='mso-bidi-font-style:
normal'><span style='color:black'>Distributor_exec.h </span></i><span
style='color:black'>and <i style='mso-bidi-font-style:normal'>Distributor_exec.cpp
</i>files for us. You should now add your business logic to the executors. Look
into <i style='mso-bidi-font-style:normal'><a
href="Distributor/Distributor_exec.h">Distributor_exec.h</a> </i>and <i
style='mso-bidi-font-style:normal'><a href="Distributor/Distributor_exec.cpp">Distributor_exec.cpp</a>
</i>to see how we implemented this.<span style='mso-bidi-font-weight:bold'><o:p></o:p></span></span></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:.5in'><b style='mso-bidi-font-weight:normal'><span
style='color:black'>Broker:<o:p></o:p></span></b></p>

<p class=MsoNormal style='margin-top:0in;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.25in;text-indent:-.25in;mso-list:l0 level1 lfo1;tab-stops:list 1.25in'><![if !supportLists]><span
style='font-family:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:
Symbol;color:black;mso-bidi-font-weight:bold'><span style='mso-list:Ignore'>&middot;<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='color:black;mso-bidi-font-weight:
bold'>The CIDLC compiler generated an empty </span><i style='mso-bidi-font-style:
normal'><span style='color:black'>Distributor_exec.h </span></i><span
style='color:black'>and <i style='mso-bidi-font-style:normal'>Distributor_exec.cpp
</i>files for us. You should now add your business logic to the executors. Look
into <i style='mso-bidi-font-style:normal'><a href="Broker/Broker_exec.h">Broker_exec.h</a>
</i>and <i style='mso-bidi-font-style:normal'><a href="Broker/Broker_exec.cpp">Broker_exec.cpp</a>
</i>to see how we implemented this.<span style='mso-bidi-font-weight:bold'><o:p></o:p></span></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:black'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<div class=MsoNormal align=center style='text-align:center'><span
style='color:black'>

<hr size=2 width="100%" align=center>

</span></div>

<address><span style='color:black'><a href="mailto:ming.xiong@vanderbilt.edu">Ming
Xiong<br>
</a><o:p></o:p></span></address>

<p class=MsoNormal><span style='color:black'><!-- Created: Sat Nov 27 15:25:06 CST 1999 --><!-- hhmts start -->Last
modified:<!-- hhmts end --> <o:p></o:p></span></p>

</div>

</body>

</html>