File: a00154.html

package info (click to toggle)
omnievents 2.6.1-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,228 kB
  • ctags: 2,538
  • sloc: cpp: 7,346; sh: 2,568; python: 2,171; xml: 2,057; java: 1,407; makefile: 304; ansic: 9
file content (335 lines) | stat: -rw-r--r-- 23,126 bytes parent folder | download
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
327
328
329
330
331
332
333
334
335
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>EventChannelFactory.cc Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="main.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>EventChannelFactory.cc</h1><a href="a00094.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">// -*- Mode: C++; -*-</font>
00002 <font class="comment">//                            Package   : omniEvents</font>
00003 <font class="comment">// EventChannelFactory_i.cc   Created   : 1/4/98</font>
00004 <font class="comment">//                            Author    : Paul Nader (pwn)</font>
00005 <font class="comment">//</font>
00006 <font class="comment">//    Copyright (C) 1998 Paul Nader.</font>
00007 <font class="comment">//</font>
00008 <font class="comment">//    This file is part of the omniEvents application.</font>
00009 <font class="comment">//</font>
00010 <font class="comment">//    omniEvents is free software; you can redistribute it and/or</font>
00011 <font class="comment">//    modify it under the terms of the GNU Lesser General Public</font>
00012 <font class="comment">//    License as published by the Free Software Foundation; either</font>
00013 <font class="comment">//    version 2.1 of the License, or (at your option) any later version.</font>
00014 <font class="comment">//</font>
00015 <font class="comment">//    omniEvents is distributed in the hope that it will be useful,</font>
00016 <font class="comment">//    but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00017 <font class="comment">//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</font>
00018 <font class="comment">//    Lesser General Public License for more details.</font>
00019 <font class="comment">//</font>
00020 <font class="comment">//    You should have received a copy of the GNU Lesser General Public</font>
00021 <font class="comment">//    License along with this library; if not, write to the Free Software</font>
00022 <font class="comment">//    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</font>
00023 <font class="comment">//</font>
00024 <font class="comment">// Description:</font>
00025 <font class="comment">//      Implementation of the COSS Event Services Event Channel Factory</font>
00026 <font class="comment">//      </font>
00027 
00028 <font class="preprocessor">#include "<a class="code" href="a00095.html">EventChannelFactory.h</a>"</font>
00029 
00030 <font class="preprocessor">#include "<a class="code" href="a00115.html">Orb.h</a>"</font>
00031 <font class="preprocessor">#include "<a class="code" href="a00093.html">EventChannel.h</a>"</font>
00032 <font class="preprocessor">#include "<a class="code" href="a00117.html">PersistNode.h</a>"</font>
00033 
00034 <font class="preprocessor">#include &lt;memory&gt;</font>
00035 
00036 <font class="preprocessor">#ifdef HAVE_OMNIORB4</font>
00037 <font class="preprocessor"></font><font class="preprocessor">#  define STR_MATCH(s1,s2) omni::strMatch((s1),(s2))</font>
00038 <font class="preprocessor"></font><font class="preprocessor">#else</font>
<a name="l00039"></a><a class="code" href="a00094.html#a0">00039</a> <font class="preprocessor"></font><font class="preprocessor">#  define STR_MATCH(s1,s2) (0==::strcmp((s1),(s2)))</font>
00040 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00041 <font class="preprocessor"></font>
00042 <font class="keyword">namespace </font>OmniEvents {
00043 
00044 <font class="comment">//------------------------------------------------------------------------</font>
00045 <font class="comment">//           Event Channel Factory Interface Implementation</font>
00046 <font class="comment">//------------------------------------------------------------------------</font>
<a name="l00047"></a><a class="code" href="a00047.html#a5">00047</a> EventChannelFactory_i::EventChannelFactory_i(<font class="keyword">const</font> <a class="code" href="a00060.html">PersistNode</a>&amp; node)
00048 : <a class="code" href="a00073.html">Servant</a>(<a class="code" href="a00059.html">Orb</a>::inst()._omniINSPOA.in()),
00049   _port(node.attrLong("port",11169)),
00050   _endPointNoListen(node.attrString("endPointNoListen")),
00051   _channels()
00052 {
00053   <font class="comment">// Create event channels</font>
00054   <font class="keywordflow">for</font>(map&lt;string,PersistNode*&gt;::const_iterator i=node._child.begin();
00055       i!=node._child.end();
00056       ++i)
00057   {
00058     <a class="code" href="a00046.html">EventChannel_i</a>* channel =<font class="keyword">new</font> <a class="code" href="a00046.html">EventChannel_i</a>(&amp;<a class="code" href="a00047.html#o2">_channels</a>);
00059     channel-&gt;<a class="code" href="a00046.html#a6">activate</a>(
00060       i-&gt;first.c_str(), <font class="comment">// channelName</font>
00061       i-&gt;second         <font class="comment">// node</font>
00062     );
00063     channel-&gt;start();
00064   }
00065   <a class="code" href="a00073.html#b1">activateObjectWithId</a>(<font class="stringliteral">"omniEvents"</font>);
00066 }
00067 
00068 
00069 CORBA::Boolean
<a name="l00070"></a><a class="code" href="a00047.html#a0">00070</a> EventChannelFactory_i::supports(<font class="keyword">const</font> CosLifeCycle::Key &amp;k)
00071 {
00072   <font class="keywordflow">if</font>((k.length() == 1) &amp;&amp;
00073      (strcmp(k[0].id, <font class="stringliteral">"EventChannel"</font>) == 0) &amp;&amp;
00074      (strcmp(k[0].kind, <font class="stringliteral">"object interface"</font>) == 0))
00075     <font class="keywordflow">return</font> 1;
00076   <font class="keywordflow">else</font>
00077     <font class="keywordflow">return</font> 0;
00078 }
00079 
00080 
00081 CORBA::Object_ptr
<a name="l00082"></a><a class="code" href="a00047.html#a1">00082</a> EventChannelFactory_i::create_object(
00083   <font class="keyword">const</font> CosLifeCycle::Key&amp; k,
00084   <font class="keyword">const</font> CosLifeCycle::Criteria&amp; criteria
00085 )
00086 {
00087   <font class="comment">// Check the key</font>
00088   <font class="keywordflow">if</font>(!this-&gt;<a class="code" href="a00047.html#a0">supports</a>(k))
00089       <font class="keywordflow">throw</font> CosLifeCycle::NoFactory(k);
00090 
00091   <font class="comment">// Process criteria !! MAY THROW !!</font>
00092   auto_ptr&lt;PersistNode&gt; criteriaNode( <a class="code" href="a00047.html#a6">parseCriteria</a>(criteria) );
00093 
00094   CORBA::String_var channelId;
00095   <font class="keywordflow">if</font>(criteriaNode-&gt;hasAttr(<font class="stringliteral">"InsName"</font>))
00096       channelId=criteriaNode-&gt;attrString(<font class="stringliteral">"InsName"</font>).c_str();
00097   <font class="keywordflow">else</font>
00098       channelId=<a class="code" href="a00138.html#a10">newUniqueId</a>();
00099 
00100   <font class="comment">// Create the channel.</font>
00101   <font class="comment">// We place it into an auto_ptr - this will automatically clean up if anything</font>
00102   <font class="comment">// goes wrong.</font>
00103   auto_ptr&lt;EventChannel_i&gt; channel( <font class="keyword">new</font> <a class="code" href="a00046.html">EventChannel_i</a>(&amp;<a class="code" href="a00047.html#o2">_channels</a>) );
00104   <font class="keywordflow">try</font>
00105   {
00106     channel-&gt;activate(channelId.in(),criteriaNode.get()); <font class="comment">// !! MAY THROW !!</font>
00107   }
00108   <font class="keywordflow">catch</font>(PortableServer::POA::ObjectAlreadyActive&amp; ex)
00109   {
00110     <font class="keywordflow">throw</font> CosLifeCycle::InvalidCriteria(criteria); <font class="comment">//??</font>
00111   }
00112   <font class="keywordflow">catch</font>(PortableServer::POA::AdapterAlreadyExists&amp; ex) <font class="comment">// create_POA</font>
00113   {
00114     <font class="keywordflow">throw</font> CosLifeCycle::InvalidCriteria(criteria); <font class="comment">//??</font>
00115   }
00116 
00117   <font class="comment">// Start the channel's thread running. We release() the pointer, as the</font>
00118   <font class="comment">// thread will delete it when it stops.</font>
00119   channel-&gt;start();
00120   <font class="keywordflow">return</font> channel.release()-&gt;_this();
00121 }
00122 
00123 
00124 CosEventChannelAdmin::EventChannel_ptr
<a name="l00125"></a><a class="code" href="a00047.html#a3">00125</a> EventChannelFactory_i::create_channel(<font class="keyword">const</font> <font class="keywordtype">char</font>* channel_name)
00126 {
00127   CosEventChannelAdmin::EventChannel_var result;
00128 
00129   CosLifeCycle::Key key;
00130   key.length(1);
00131   key[0].id  =<font class="stringliteral">"EventChannel"</font>;
00132   key[0].kind=<font class="stringliteral">"object interface"</font>;
00133 
00134   CosLifeCycle::Criteria criteria;
00135   criteria.length(1);
00136   criteria[0].name    = <font class="stringliteral">"InsName"</font>;
00137   criteria[0].value &lt;&lt;= channel_name;
00138 
00139   <font class="keywordflow">try</font>
00140   {
00141     CORBA::Object_var obj=<a class="code" href="a00047.html#a1">create_object</a>(key,criteria);
00142     result=CosEventChannelAdmin::EventChannel::_narrow(obj.in());
00143   }
00144   <font class="keywordflow">catch</font>(CosLifeCycle::InvalidCriteria&amp; ex)
00145   {
00146     <font class="keywordflow">if</font>(ex.invalid_criteria.length()&gt;0 &amp;&amp;
00147        <a class="code" href="a00094.html#a0">STR_MATCH</a>(ex.invalid_criteria[0].name,<font class="stringliteral">"InsName"</font>))
00148     {
00149       <font class="keywordflow">throw</font> event::NameAlreadyUsed();
00150     }
00151     <font class="keywordflow">else</font>
00152     {
00153       <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Failed to create_channel."</font>
00154         <font class="stringliteral">" Converting InvalidCriteria exception into UNKNOWN."</font>)
00155       <font class="keywordflow">throw</font> CORBA::UNKNOWN();
00156     }
00157   }
00158   <font class="keywordflow">catch</font>(CORBA::UserException&amp; ex)
00159   {
00160     <a class="code" href="a00115.html#a2">DB</a>(2,<font class="stringliteral">"Failed to create_channel. Converting UserException"</font>
00161       <a class="code" href="a00115.html#a0">IFELSE_OMNIORB4</a>(<font class="stringliteral">" '"</font>&lt;&lt;ex._name()&lt;&lt;<font class="stringliteral">"'"</font>,&lt;&lt;) <font class="stringliteral">" into UNKNOWN."</font>)
00162     <font class="keywordflow">throw</font> CORBA::UNKNOWN();
00163   }
00164   <font class="keywordflow">return</font> result._retn();
00165 }
00166 
00167 
00168 CosEventChannelAdmin::EventChannel_ptr
<a name="l00169"></a><a class="code" href="a00047.html#a4">00169</a> EventChannelFactory_i::join_channel(<font class="keyword">const</font> <font class="keywordtype">char</font>* channel_name)
00170 {
00171   <font class="keyword">using</font> <font class="keyword">namespace </font>PortableServer;
00172   CosEventChannelAdmin::EventChannel_var result;
00173   <font class="keywordflow">try</font>
00174   {
00175     ObjectId_var oid =PortableServer::string_to_ObjectId(channel_name);
00176     CORBA::Object_var obj =Orb::inst()._omniINSPOA-&gt;id_to_reference(oid.in());
00177     result=CosEventChannelAdmin::EventChannel::_narrow(obj.in());
00178   }
00179   <font class="keywordflow">catch</font>(POA::ObjectNotActive&amp;)
00180   {
00181     <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Failed to join_channel. Object not active."</font>)
00182     <font class="keywordflow">throw</font> event::EventChannelNotFound();
00183   }
00184   <font class="keywordflow">catch</font>(CORBA::UserException&amp; ex)
00185   {
00186     <a class="code" href="a00115.html#a2">DB</a>(2,<font class="stringliteral">"Failed to join_channel. Converting UserException"</font>
00187       <a class="code" href="a00115.html#a0">IFELSE_OMNIORB4</a>(<font class="stringliteral">" '"</font>&lt;&lt;ex._name()&lt;&lt;<font class="stringliteral">"'"</font>,&lt;&lt;) <font class="stringliteral">" into UNKNOWN."</font>)
00188     <font class="keywordflow">throw</font> CORBA::UNKNOWN();
00189   }
00190   <font class="keywordflow">return</font> result._retn();
00191 }
00192 
00193 
<a name="l00194"></a><a class="code" href="a00047.html#a6">00194</a> <a class="code" href="a00060.html">PersistNode</a>* EventChannelFactory_i::parseCriteria(
00195   <font class="keyword">const</font> CosLifeCycle::Criteria &amp;criteria
00196 )<font class="keyword"> const</font>
00197 <font class="keyword"></font>{
00198   <font class="keyword">using</font> <font class="keyword">namespace </font>CosLifeCycle;
00199   auto_ptr&lt;PersistNode&gt; result( <font class="keyword">new</font> <a class="code" href="a00060.html">PersistNode</a>() );
00200 
00201   <font class="keywordflow">for</font>(CORBA::ULong i=0; i&lt;criteria.length(); i++)
00202   {
00203     <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"PullRetryPeriod_ms"</font>) == 0)
00204     {
00205       CORBA::ULong pullRetryPeriod_ms;
00206       <font class="keywordflow">if</font>(! (criteria[i].value &gt;&gt;= pullRetryPeriod_ms))
00207           <font class="keywordflow">throw</font> InvalidCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"PullRetryPeriod_ms"</font>,criteria));
00208       <font class="keywordflow">if</font>(pullRetryPeriod_ms &lt;= 0)
00209           <font class="keywordflow">throw</font> CannotMeetCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"PullRetryPeriod_ms"</font>,criteria));
00210       result-&gt;addattr(<font class="stringliteral">"PullRetryPeriod_ms"</font>,pullRetryPeriod_ms);
00211     }
00212     <font class="keywordflow">else</font> <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"PullRetryPeriod"</font>) == 0)
00213     {
00214       <font class="comment">// This criterion has been deprecated in favour of PullRetryPeriod_ms.</font>
00215       <font class="comment">// Don't overwrite any value provided by the latter.</font>
00216       <font class="keywordflow">if</font>(!result-&gt;hasAttr(<font class="stringliteral">"PullRetryPeriod_ms"</font>))
00217       {
00218         CORBA::ULong pullRetryPeriod;
00219         <font class="keywordflow">if</font>(! (criteria[i].value &gt;&gt;= pullRetryPeriod))
00220             <font class="keywordflow">throw</font> InvalidCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"PullRetryPeriod"</font>,criteria));
00221         <font class="keywordflow">if</font>(pullRetryPeriod &lt;= 0)
00222             <font class="keywordflow">throw</font> CannotMeetCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"PullRetryPeriod"</font>,criteria));
00223         result-&gt;addattr(<font class="stringliteral">"PullRetryPeriod_ms"</font>,pullRetryPeriod*1000);
00224       }
00225     }
00226     <font class="keywordflow">else</font> <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"MaxQueueLength"</font>) == 0)
00227     {
00228       CORBA::ULong maxQueueLength;
00229       <font class="keywordflow">if</font>(! (criteria[i].value &gt;&gt;= maxQueueLength))
00230           <font class="keywordflow">throw</font> InvalidCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"MaxQueueLength"</font>,criteria));
00231       <font class="keywordflow">if</font>(maxQueueLength &gt; 0)
00232           result-&gt;addattr(<font class="stringliteral">"MaxQueueLength"</font>,maxQueueLength);
00233       <font class="keywordflow">else</font>
00234           <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Ignoring CosLifeCycle criterion: MaxQueueLength=0"</font>);
00235     }
00236     <font class="keywordflow">else</font> <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"MaxNumProxies"</font>) == 0)
00237     {
00238       CORBA::ULong maxNumProxies;
00239       <font class="keywordflow">if</font>(! (criteria[i].value &gt;&gt;= maxNumProxies))
00240           <font class="keywordflow">throw</font> InvalidCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"MaxNumProxies"</font>,criteria));
00241       <font class="keywordflow">if</font>(maxNumProxies &gt; 0)
00242           result-&gt;addattr(<font class="stringliteral">"MaxNumProxies"</font>,maxNumProxies);
00243       <font class="keywordflow">else</font>
00244           <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Ignoring CosLifeCycle criterion: MaxNumProxies=0"</font>);
00245     }
00246     <font class="keywordflow">else</font> <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"CyclePeriod_ns"</font>) == 0)
00247     {
00248       CORBA::ULong cyclePeriod_ns;
00249       <font class="keywordflow">if</font>(! (criteria[i].value &gt;&gt;= cyclePeriod_ns))
00250           <font class="keywordflow">throw</font> InvalidCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"CyclePeriod_ns"</font>,criteria));
00251       <font class="keywordflow">if</font>(cyclePeriod_ns &gt; 0)
00252           result-&gt;addattr(<font class="stringliteral">"CyclePeriod_ns"</font>,cyclePeriod_ns);
00253       <font class="keywordflow">else</font>
00254           <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Ignoring CosLifeCycle criterion: CyclePeriod_ns=0"</font>);
00255     }
00256     <font class="keywordflow">else</font> <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"InsName"</font>) == 0)
00257     {
00258       <font class="keyword">const</font> <font class="keywordtype">char</font>* insName;
00259       <font class="keywordflow">if</font>(! (criteria[i].value &gt;&gt;= insName))
00260           <font class="keywordflow">throw</font> InvalidCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"InsName"</font>,criteria));
00261       <font class="keywordflow">if</font>(insName &amp;&amp; insName[0])
00262           result-&gt;addattr(string(<font class="stringliteral">"InsName="</font>)+insName);
00263       <font class="keywordflow">else</font>
00264           <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Ignoring empty CosLifeCycle criterion: InsName"</font>);
00265     }
00266     <font class="keywordflow">else</font> <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"FilterId"</font>) == 0)
00267     {
00268       <font class="keyword">const</font> <font class="keywordtype">char</font>* repositoryId;
00269       <font class="keywordflow">if</font>(! (criteria[i].value &gt;&gt;= repositoryId))
00270           <font class="keywordflow">throw</font> InvalidCriteria(<a class="code" href="a00047.html#a7">extract</a>(<font class="stringliteral">"FilterId"</font>,criteria));
00271       <font class="keywordflow">if</font>(repositoryId &amp;&amp; repositoryId[0])
00272           result-&gt;addattr(string(<font class="stringliteral">"FilterId="</font>)+repositoryId);
00273       <font class="keywordflow">else</font>
00274           <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Ignoring empty CosLifeCycle criterion: FilterId"</font>);
00275     }
00276     <font class="keywordflow">else</font> <font class="keywordflow">if</font>(strcmp(criteria[i].name, <font class="stringliteral">"MaxEventsPerConsumer"</font>) == 0)
00277     {
00278       <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Ignoring obsolete CosLifeCycle criterion: MaxEventsPerConsumer"</font>);
00279     }
00280     <font class="keywordflow">else</font>
00281     {
00282       <a class="code" href="a00115.html#a2">DB</a>(10,<font class="stringliteral">"Ignoring unknown CosLifeCycle criterion: "</font>&lt;&lt;criteria[i].name);
00283     }
00284   } <font class="comment">// end loop for(i)</font>
00285   
00286   <font class="keywordflow">return</font> result.release();
00287 }
00288 
00289 
<a name="l00290"></a><a class="code" href="a00047.html#a7">00290</a> CosLifeCycle::Criteria EventChannelFactory_i::extract(
00291   <font class="keyword">const</font> <font class="keywordtype">char</font>*                   name,
00292   <font class="keyword">const</font> CosLifeCycle::Criteria&amp; from
00293 )<font class="keyword"> const</font>
00294 <font class="keyword"></font>{
00295   CosLifeCycle::Criteria result;
00296   result.length(0);
00297   <font class="keywordflow">for</font>(CORBA::ULong i=0; i&lt;from.length(); i++)
00298   {
00299     <font class="keywordflow">if</font>(strcmp(from[i].name,name) == 0)
00300     {
00301       result.length(1);
00302       result[0]=from[i];
00303       <font class="keywordflow">break</font>;
00304     }
00305   }
00306   <font class="keywordflow">return</font> result;
00307 }
00308 
00309 
00310 <font class="keywordtype">void</font>
<a name="l00311"></a><a class="code" href="a00047.html#a8">00311</a> EventChannelFactory_i::output(ostream &amp;os)
00312 {
00313   os&lt;&lt;<font class="stringliteral">"ecf port="</font>&lt;&lt;<a class="code" href="a00047.html#o0">_port</a>;
00314   <font class="keywordflow">if</font>(!<a class="code" href="a00047.html#o1">_endPointNoListen</a>.empty())
00315       os&lt;&lt;<font class="stringliteral">" endPointNoListen="</font>&lt;&lt;<a class="code" href="a00047.html#o1">_endPointNoListen</a>;
00316   os&lt;&lt;<font class="stringliteral">" ;;\n"</font>;
00317   <a class="code" href="a00047.html#o2">_channels</a>.<a class="code" href="a00048.html#a4">output</a>(os);
00318 }
00319 
00320 
00321 }; <font class="comment">// end namespace OmniEvents</font>
</pre></div><hr><address align="right"><small>Generated on Fri Nov 19 17:42:20 2004 for OmniEvents by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>