-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRandomInterface.cpp
More file actions
362 lines (321 loc) · 8.77 KB
/
RandomInterface.cpp
File metadata and controls
362 lines (321 loc) · 8.77 KB
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
// **********************************************************************
//
// Generated by the ORBacus IDL-to-C++ Translator
//
// Copyright (c) 2005
// IONA Technologies, Inc.
// Waltham, MA, USA
//
// All Rights Reserved
//
// **********************************************************************
// Version: 4.3.3
#include <OB/CORBAClient.h>
#include <RandomInterface.h>
#ifndef OB_INTEGER_VERSION
# error No ORBacus version defined! Is <OB/CORBA.h> included?
#endif
#ifndef OB_NO_VERSION_CHECK
# if (OB_INTEGER_VERSION != 4030300L)
# error ORBacus version mismatch!
# endif
#endif
namespace Genetic
{
::OB::TypeCodeConst _tc_RandomSeq(
"017749f01500000048000000017f00001a00000049444c3a47656e657469632f52616e646f6d5"
"365713a312e300000000a00000052616e646f6d536571000000130000000c00000001ffffff03"
"00000000000000"
);
::OB::TypeCodeConst _tc_RandomProvider(
"017749f00e0000003b000000017f00001f00000049444c3a47656e657469632f52616e646f6d5"
"0726f76696465723a312e3000000f00000052616e646f6d50726f766964657200"
);
} // End of namespace Genetic
//
// IDL:Genetic/RandomSeq:1.0
//
void
Genetic::OBInfo_RandomSeq::marshal(const void* _ob_v, OB::OutputStreamImpl* _ob_out) const
{
const ::Genetic::RandomSeq& _ob_seq = *(const ::Genetic::RandomSeq*)_ob_v;
::CORBA::ULong _ob_len0 = _ob_seq.length();
_ob_out -> write_ulong(_ob_len0);
_ob_out -> write_long_array(_ob_seq.get_buffer(), _ob_len0);
}
void
Genetic::OBInfo_RandomSeq::unmarshal(void* _ob_v, OB::InputStreamImpl* _ob_in) const
{
::Genetic::RandomSeq& _ob_seq = *(::Genetic::RandomSeq*)_ob_v;
::CORBA::ULong _ob_len0 = _ob_in -> read_ulong();
_ob_seq.length(_ob_len0);
_ob_in -> read_long_array(_ob_seq.get_buffer(), _ob_len0);
}
void
operator<<=(::CORBA::Any& any, Genetic::RandomSeq* v)
{
static const Genetic::OBInfo_RandomSeq info;
any.replace(Genetic::_tc_RandomSeq, v, true, &info);
}
void
operator<<=(::CORBA::Any& any, const Genetic::RandomSeq& v)
{
any <<= new Genetic::RandomSeq(v);
}
::CORBA::Boolean
operator>>=(const ::CORBA::Any& any, const Genetic::RandomSeq*& v)
{
if(any.check_type(Genetic::_tc_RandomSeq))
{
if(!any.info())
{
OB::InputStream_var _ob_in = any.create_input_stream();
Genetic::RandomSeq* val = new Genetic::RandomSeq;
::CORBA::ULong _ob_len0 = _ob_in -> read_ulong();
(*val).length(_ob_len0);
_ob_in -> read_long_array((*val).get_buffer(), _ob_len0);
(::CORBA::Any&)any <<= val;
}
v = (Genetic::RandomSeq*)any.value();
return true;
}
else
return false;
}
//
// IDL:Genetic/RandomProvider:1.0
//
const char* Genetic::RandomProvider::ids_[] =
{
"IDL:Genetic/RandomProvider:1.0",
0
};
void
OBDuplicate(Genetic::RandomProvider_ptr p)
{
if(p)
p -> _add_ref();
}
void
OBRelease(Genetic::RandomProvider_ptr p)
{
if(p)
p -> _remove_ref();
}
Genetic::RandomProvider_ptr
Genetic::RandomProvider::_narrow(::CORBA::Object_ptr p)
{
if(!::CORBA::is_nil(p))
{
RandomProvider_ptr v =
dynamic_cast< RandomProvider_ptr >(p);
if(v)
return _duplicate(v);
if(p -> _is_a(ids_[0]))
{
OBProxy_Genetic::RandomProvider* val = new OBProxy_Genetic::RandomProvider;
val -> _OB_copyFrom(p);
return val;
}
}
return _nil();
}
Genetic::RandomProvider_ptr
Genetic::RandomProvider::_narrow(::CORBA::AbstractBase_ptr p)
{
if(!::CORBA::is_nil(p))
{
RandomProvider_ptr v =
dynamic_cast< RandomProvider_ptr >(p);
if(v)
return _duplicate(v);
::CORBA::Object_var obj = p -> _to_object();
return _narrow(obj);
}
return _nil();
}
Genetic::RandomProvider_ptr
Genetic::RandomProvider::_unchecked_narrow(::CORBA::Object_ptr p)
{
if(!::CORBA::is_nil(p))
{
RandomProvider_ptr v =
dynamic_cast< RandomProvider_ptr >(p);
if(v)
return _duplicate(v);
OBProxy_Genetic::RandomProvider* val = new OBProxy_Genetic::RandomProvider;
val -> _OB_copyFrom(p);
return val;
}
return _nil();
}
Genetic::RandomProvider_ptr
Genetic::RandomProvider::_unchecked_narrow(::CORBA::AbstractBase_ptr p)
{
if(!::CORBA::is_nil(p))
{
::CORBA::Object_var obj = p -> _to_object();
return _unchecked_narrow(obj);
}
return _nil();
}
const char**
Genetic::RandomProvider::_OB_staticIds()
{
return ids_;
}
void
OBMarshal(Genetic::RandomProvider_ptr _ob_v, OB::OutputStreamImpl* _ob_out)
{
_ob_out -> write_Object(_ob_v);
}
void
OBUnmarshal(Genetic::RandomProvider_ptr& _ob_v, OB::InputStreamImpl* _ob_in)
{
Genetic::RandomProvider_var old = _ob_v;
::CORBA::Object_var p = _ob_in -> read_Object();
if(!::CORBA::is_nil(p))
{
OBProxy_Genetic::RandomProvider* _ob_obj = new OBProxy_Genetic::RandomProvider;
_ob_obj -> _OB_copyFrom(p);
_ob_v = _ob_obj;
}
else
_ob_v = Genetic::RandomProvider::_nil();
}
void
operator<<=(::CORBA::Any& any, Genetic::RandomProvider_ptr* v)
{
any.replace(Genetic::_tc_RandomProvider, (::CORBA::Object_ptr)*v, true);
}
void
operator<<=(::CORBA::Any& any, Genetic::RandomProvider_ptr v)
{
Genetic::RandomProvider_ptr val = Genetic::RandomProvider::_duplicate(v);
any <<= &val;
}
::CORBA::Boolean
operator>>=(const ::CORBA::Any& any, Genetic::RandomProvider_ptr& v)
{
if(any.check_type(Genetic::_tc_RandomProvider))
{
::CORBA::Object_ptr val = (::CORBA::Object_ptr)any.value();
if(!::CORBA::is_nil(val))
{
if(!(v = dynamic_cast< Genetic::RandomProvider_ptr >(val)))
{
OBProxy_Genetic::RandomProvider* obj = new OBProxy_Genetic::RandomProvider;
obj -> _OB_copyFrom(val);
v = obj;
(::CORBA::Any&)any <<= &v;
}
}
else
v = Genetic::RandomProvider::_nil();
return true;
}
else
return false;
}
//
// IDL:Genetic/RandomProvider:1.0
//
OB::MarshalStubImpl_ptr
OBProxy_Genetic::RandomProvider::_OB_createMarshalStubImpl()
{
return new OBMarshalStubImpl_Genetic::RandomProvider;
}
const char**
OBProxy_Genetic::RandomProvider::_OB_ids() const
{
return ::Genetic::RandomProvider::ids_;
}
//
// IDL:Genetic/RandomProvider/getRandomLong:1.0
//
::Genetic::RandomSeq*
OBProxy_Genetic::RandomProvider::getRandomLong(::CORBA::Long _ob_a0)
{
::CORBA::ULong _ob_retry = 0, _ob_hop = 0;
while(true)
{
try
{
OB::StubImplBase_var _ob_stubImplBase = _OB_getStubImpl();
OBStubImpl_Genetic::RandomProvider_ptr _ob_stubImpl =
dynamic_cast< OBStubImpl_Genetic::RandomProvider_ptr>(_ob_stubImplBase.in());
return _ob_stubImpl -> getRandomLong(_ob_a0);
}
catch(const OB::ExceptionBase& _ob_ex)
{
_OB_handleException(_ob_ex, _ob_retry, _ob_hop);
}
}
}
//
// IDL:Genetic/RandomProvider:1.0
//
void
OBDuplicate(OBStubImpl_Genetic::RandomProvider_ptr p)
{
if(p)
p -> _OB_incRef();
}
void
OBRelease(OBStubImpl_Genetic::RandomProvider_ptr p)
{
if(p)
p -> _OB_decRef();
}
//
// IDL:Genetic/RandomProvider/getRandomLong:1.0
//
::Genetic::RandomSeq*
OBMarshalStubImpl_Genetic::RandomProvider::getRandomLong(::CORBA::Long _ob_a0)
{
while(true)
{
OB::Downcall_var _ob_down = _OB_createDowncall("getRandomLong", true);
try
{
OB::OutputStreamImpl* _ob_out = _OB_preMarshal(_ob_down);
try
{
_ob_out -> write_long(_ob_a0);
}
catch(const ::CORBA::SystemException& _ob_ex)
{
_OB_marshalEx(_ob_down, _ob_ex);
}
_OB_postMarshal(_ob_down);
_OB_request(_ob_down);
bool _ob_uex;
OB::InputStreamImpl* _ob_in = _OB_preUnmarshal(_ob_down, _ob_uex);
if(_ob_uex)
{
_OB_postUnmarshal(_ob_down);
}
else
{
::Genetic::RandomSeq_var _ob_r;
try
{
_ob_r = new ::Genetic::RandomSeq;
::CORBA::ULong _ob_len0 = _ob_in -> read_ulong();
_ob_r -> length(_ob_len0);
_ob_in -> read_long_array(_ob_r -> get_buffer(), _ob_len0);
}
catch(const ::CORBA::SystemException& _ob_ex)
{
_OB_unmarshalEx(_ob_down, _ob_ex);
}
_OB_postUnmarshal(_ob_down);
return _ob_r._retn();
}
}
catch(const OB::FailureException& _ob_ex)
{
_OB_handleFailureException(_ob_down, _ob_ex);
}
}
}