summaryrefslogtreecommitdiff
path: root/modules/CIAO/docs/tutorials/Quoter/Simple/02.html
blob: 071398d657efa43e1d600512569776e03f0856fb (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
<!-- $Id$ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="generator" content=
  "HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 13), see www.w3.org" />

  <title>Getting Started</title>
  <meta http-equiv="Content-Type" content=
  "text/html; charset=us-ascii" />
  <style type="text/css">
/*<![CDATA[*/
  <!--
  h3 {
        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 {
        font-size:12.0pt;
        font-family:"Times New Roman";
  }
  code {
        font-family:"Courier New";
  }
  div.Section1 {
        page:Section1
  }
  -->
  /*]]>*/
  </style><!-- 01.html,v 1.3 2006/02/10 14:34:35 mxiong Exp -->

  <style type="text/css">
/*<![CDATA[*/
  body {
  background-color: #FFFFFF;
  }
  :link { color: #000FFF }
  :visited { color: #FF0F0F }
  div.c18 {TEXT-ALIGN: center; text-align: center}
  hr.c17 {text-align: center}
  p.c16 {TEXT-ALIGN: center; text-align: center}
  p.c15 {MARGIN-BOTTOM:12pt}
  span.c14 {COLOR: black}
  p.c13 {LINE-HEIGHT:150%}
  p.c12 {MARGIN:0in 0in 12pt 1.25in}
  p.c11 {MARGIN:0in 0in 12pt 1.5in}
  span.c10 {COLOR:black; FONT-FAMILY:'Courier New';}
  p.c9 {MARGIN:0in 0in 12pt 1.25in;TEXT-INDENT:-0.25in;}
  span.c8 {COLOR:black;}
  span.c7 {COLOR:black;FONT-FAMILY:Symbol;}
  span.c6 {FONT:7pt 'Times New Roman'}
  p.c5 {MARGIN: 0in 0in 12pt 0.5in; font-weight: bold}
  p.c4 {MARGIN-BOTTOM: 12pt; font-weight: bold}
  h3.c3 {TEXT-ALIGN: center; text-align: center}
  h3.c2 {LINE-HEIGHT: 150%; MARGIN: 0in 0in 0pt; TEXT-ALIGN: center; text-align: center}
  span.c1 {COLOR:black}
  /*]]>*/
  </style>
</head>

<body lang="EN-US" xml:lang="EN-US">
  <div class="Section1">
    <h3 class='c2'><span class='c1'>Step 2: Implement your
    components</span></h3>

    <h3 class='c3'><span class='c1'><img width="634" height="376"
    id="_x0000_i1025" src="images/step2.jpg" name=
    "_x0000_i1025" /></span></h3>

    <p class='c4'><span class='c1'>Generating the executor files:</span></p>

    <p class='c5'><span class='c1'>Distributor:</span></p>

    <p class='c9'><span class='c7'>&middot;<span class=
    "c6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
    <span class='c8'>The MPC files we generated earlier
    automatically invoke the TAO IDL compiler to generate the
    servant and Component Implementation Framework (CIF) for us. To reduce the amount
    of work and typing we need to do, we will next instruct the
    TAO IDL compiler to generate an empty StockDistributor Executor
    implementation (Object implementation in the figure above). In
    the <i>Quoter/Distributor</i> sub-directory, type the
    following:</span></p>

    <p class='c11'><span class="c10">tao_idl -I%TAO_ROOT%
    -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao
    -Gex StockDistributor.idl</span></p>

    <p class='c12'><span class='c1'>The above command will generate
    a <i>StockDistributor_exec.h</i> and
    <i>StockDistributor_exec.cpp</i> files. These generated files
    greatly reduced the amount of work we do. We&rsquo;ll edit
    those files later in the tutorial to insert our business logic
    in the Distributor component.</span></p>

    <p class='c5'><span class='c1'>Broker:</span></p>

    <p class='c9'><span class='c7'>&middot;<span class=
    "c6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
    <span class='c8'>The MPC files we generated earlier
    automatically invoked the TAO IDL compiler to generate the
    servants, and the CIF for us. To reduce the amount
    of work and typing we need to do, we will next instruct the
    TAO IDL compiler to generate an empty StockBroker Executor
    implementation (Object implementation in the figure above). In
    the <i>Quoter/Broker</i> sub-directory, type the
    following:</span></p>

    <p class='c11'><span class="c10">tao_idl -I%TAO_ROOT%
    -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao
    -Gex StockBroker.idl</span></p>

    <p class='c12'><span class='c1'>The above command will generate
    a <i>StockBroker_exec.h</i> and <i>StockBroker_exec.cpp</i>
    files. These generated files greatly reduced the amount of work
    we do. We&rsquo;ll edit those files later in the tutorial to
    insert our business logic in the Broker component.</span></p>

    <p class='c13'><span class='c1'><br />
    <b>Note:</b></span></p>

    <p class='c13'><span class='c1'>To understand the meaning of
    different parameters passed to the TAO IDL compiler, type the following
    command:</span></p>

    <p class='c15'><span class="c10">tao_idl -?</span><span class=
    'c14'><br />
    <br />
    <br /></span></p>

    <p class='c4'><span class='c1'>Implement the
    Components:</span></p>

    <p class='c5'><span class='c1'>Distributor:</span></p>

    <p class='c9'><span class='c7'>&middot;<span class=
    "c6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
    <span class='c8'>The TAO IDL compiler generated an empty</span>
    <i><span class='c1'>StockDistributor_exec.h</span></i>
    <span class='c1'>and <i>StockDistributor_exec.cpp</i> files for
    us. You should now add your business logic to the executors.
    Look into <i><a href=
    "Distributor/StockDistributor_exec.h">StockDistributor_exec.h</a></i>
    and <i><a href=
    "Distributor/StockDistributor_exec.cpp">StockDistributor_exec.cpp</a></i>
    to see how we implemented this.</span></p>

    <p class='c5'><span class='c1'>Broker:</span></p>

    <p class='c9'><span class='c7'>&middot;<span class=
    "c6">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
    <span class='c8'>The TAO IDL compiler generated an empty</span>
    <i><span class='c1'>StockBroker_exec.h</span></i> <span class=
    'c1'>and <i>StockBroker_exec.cpp</i> files for us. You should
    now add your business logic to the executors. Look into
    <i><a href=
    "Broker/StockBroker_exec.h">StockBroker_exec.h</a></i> and
    <i><a href=
    "Broker/StockBroker_exec.cpp">StockBroker_exec.cpp</a></i> to
    see how we implemented this.</span></p>

    <p class='c16'><span class='c1'><a href=
    "01.html">Previous</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <a href="03.html">Next</a></span></p>

    <div class='c18'>
      <hr class="c17" size="2" width="100%" />
    </div>

    <address>
      <span class='c1'><a href=
      "mailto:ming.xiong@vanderbilt.edu">Ming
      Xiong<br /></a></span> <a href=
      "mailto:abdullah.sowayan@lmco.com">Abdullah Sowayan</a>
    </address>

    <address>
      &nbsp;
    </address>

    <address>
      $Id$
    </address>
  </div>
</body>
</html>