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
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
|
// -*- C++ -*-
//
// $Id$
// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
// TAO and the TAO IDL Compiler have been developed by:
// Center for Distributed Object Computing
// Washington University
// St. Louis, MO
// USA
// http://www.cs.wustl.edu/~schmidt/doc-center.html
// and
// Distributed Object Computing Laboratory
// University of California at Irvine
// Irvine, CA
// USA
// http://doc.ece.uci.edu/
// and
// Institute for Software Integrated Systems
// Vanderbilt University
// Nashville, TN
// USA
// http://www.isis.vanderbilt.edu/
//
// Information about TAO is available at:
// http://www.cs.wustl.edu/~schmidt/TAO.html
// TAO_IDL - Generated from
// be/be_codegen.cpp:610
#ifndef _TAO_IDL_ORIG_MESSAGINGS_CPP_
#define _TAO_IDL_ORIG_MESSAGINGS_CPP_
#include "MessagingS.h"
#include "tao/PortableServer/Object_Adapter.h"
#include "tao/PortableServer/Operation_Table.h"
#include "tao/TAO_Server_Request.h"
#include "tao/ORB_Core.h"
#include "tao/Profile.h"
#include "tao/Stub.h"
#include "tao/IFR_Client_Adapter.h"
#include "tao/Object_T.h"
#include "tao/Typecode.h"
#include "tao/DynamicC.h"
#include "tao/PortableInterceptor.h"
#if TAO_HAS_INTERCEPTORS == 1
#include "tao/RequestInfo_Util.h"
#include "tao/PICurrent.h"
#include "tao/PortableServer/ServerRequestInfo.h"
#include "tao/PortableServer/ServerInterceptorAdapter.h"
#endif /* TAO_HAS_INTERCEPTORS == 1 */
#include "ace/Dynamic_Service.h"
#include "ace/config-all.h"
#if defined (__BORLANDC__)
#pragma option -w-rvl -w-rch -w-ccc -w-aus
#endif /* __BORLANDC__ */
#if !defined (__ACE_INLINE__)
#include "MessagingS.i"
#endif /* !defined INLINE */
// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:60
// Arg traits specializations.
namespace TAO
{
};
// TAO_IDL - Generated from
// be/be_interface.cpp:1445
class TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable : public TAO_Perfect_Hash_OpTable
{
private:
unsigned int hash (const char *str, unsigned int len);
public:
const TAO_operation_db_entry * lookup (const char *str, unsigned int len);
};
/* C++ code produced by gperf version 2.8 (ACE version) */
/* Command-line: /project/tangotmp/bala/work/ACE+TAO/main_merge/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0,0 -a -o -t -p -K opname_ -L C++ -Z TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable -N lookup */
unsigned int
TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable::hash (const char *str, unsigned int len)
{
static const unsigned char asso_values[] =
{
#if defined (ACE_MVS)
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 0,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 0,
14, 14, 14, 1, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 0, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14,
#else
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 0, 14, 0, 14, 14,
14, 1, 14, 14, 14, 14, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 0, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14,
#endif /* ACE_MVS */
};
return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]];
}
const class TAO_operation_db_entry *
TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len)
{
enum
{
TOTAL_KEYWORDS = 4,
MIN_WORD_LENGTH = 5,
MAX_WORD_LENGTH = 13,
MIN_HASH_VALUE = 5,
MAX_HASH_VALUE = 13,
HASH_VALUE_RANGE = 9,
DUPLICATES = 0,
WORDLIST_SIZE = 9
};
static const class TAO_operation_db_entry wordlist[] =
{
{"",0,0,0},{"",0,0,0},{"",0,0,0},{"",0,0,0},{"",0,0,0},
{"_is_a", &POA_Messaging::ReplyHandler::_is_a_skel, 0, 0},
{"",0,0,0},{"",0,0,0},{"",0,0,0},{"",0,0,0},
{"_component", &POA_Messaging::ReplyHandler::_component_skel, 0, 0},
{"_interface", &POA_Messaging::ReplyHandler::_interface_skel, 0, 0},
{"",0,0,0},
{"_non_existent", &POA_Messaging::ReplyHandler::_non_existent_skel, 0, 0},
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
unsigned int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
{
const char *s = wordlist[key].opname_;
if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
return &wordlist[key];
}
}
return 0;
}
static TAO_Messaging_ReplyHandler_Perfect_Hash_OpTable tao_Messaging_ReplyHandler_optable;
// TAO_IDL - Generated from
// be/be_visitor_interface/interceptors_ss.cpp:52
#if (TAO_HAS_INTERCEPTORS == 1)
#endif /* TAO_HAS_INTERCEPTORS */
///////////////////////////////////////////////////////////////////////
// Strategized Proxy Broker Implementation
//
// TAO_IDL - Generated from
// be/be_visitor_interface/strategized_proxy_broker_ss.cpp:40
// Factory function Implementation.
POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker *
POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker::the_TAO_ReplyHandler_Strategized_Proxy_Broker (void)
{
static POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker strategized_proxy_broker;
return &strategized_proxy_broker;
}
POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker::_TAO_ReplyHandler_Strategized_Proxy_Broker (void)
{
}
POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker::~_TAO_ReplyHandler_Strategized_Proxy_Broker (void)
{
}
TAO::Collocation_Strategy
POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker::get_strategy (
CORBA::Object_ptr obj
ACE_ENV_ARG_DECL
)
ACE_THROW_SPEC ((CORBA::SystemException))
{
TAO::Collocation_Strategy strategy =
TAO_ORB_Core::collocation_strategy (obj ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (TAO::TAO_CS_REMOTE_STRATEGY);
return strategy;
}
void
POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker::dispatch (
CORBA::Object_ptr obj,
CORBA::Object_out forward_obj,
TAO::Argument ** args,
int num_args,
const char * op,
size_t op_len,
TAO::Collocation_Strategy strategy
ACE_ENV_ARG_DECL
)
ACE_THROW_SPEC ((CORBA::Exception))
{
TAO_Object_Adapter::Servant_Upcall servant_upcall (
obj->_stubobj ()->servant_orb_var ()->orb_core ()
);
if (strategy == TAO::TAO_CS_THRU_POA_STRATEGY)
{
servant_upcall.prepare_for_upcall (
obj->_stubobj ()->object_key (),
op,
forward_obj
ACE_ENV_ARG_PARAMETER
);
ACE_CHECK;
servant_upcall.pre_invoke_collocated_request (
ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
}
TAO_Collocated_Skeleton collocated_skel;
if (servant_upcall.servant ()->_find (op,
collocated_skel,
strategy,
op_len) == -1)
ACE_THROW (CORBA::BAD_OPERATION ());
ACE_TRY
{
collocated_skel (
servant_upcall.servant (),
args,
num_args
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
#if (TAO_HAS_MINIMUM_CORBA == 0)
ACE_CATCH (PortableServer::ForwardRequest, forward_request)
{
forward_obj =
CORBA::Object::_duplicate (forward_request.forward_reference.in ());
return;
}
#else
ACE_CATCHANY
{
ACE_UNUSED_ARG (forward_obj);
ACE_RE_THROW;
}
#endif /* TAO_HAS_MINIMUM_CORBA */
ACE_ENDTRY;
ACE_CHECK;
}
//
// End Strategized Proxy Broker Implementation
///////////////////////////////////////////////////////////////////////
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:600
TAO::Collocation_Proxy_Broker *
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function (CORBA::Object_ptr)
{
return
::POA_Messaging::_TAO_ReplyHandler_Strategized_Proxy_Broker::the_TAO_ReplyHandler_Strategized_Proxy_Broker();
}
int
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer (size_t)
{
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function_pointer =
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function;
return 0;
}
static int
Messaging__TAO_ReplyHandler_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer (
ACE_reinterpret_cast (
size_t,
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer
)
);
///////////////////////////////////////////////////////////////////////
// ThruPOA Proxy Implementation
//
// TAO_IDL - Generated from
// be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp:37
POA_Messaging::_TAO_ReplyHandler_ThruPOA_Proxy_Impl::_TAO_ReplyHandler_ThruPOA_Proxy_Impl (void)
{}
// ThruPOA Implementation of the IDL interface methods
//
// End ThruPOA Proxy Implementation
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
// Direct Proxy Implementation
//
POA_Messaging::_TAO_ReplyHandler_Direct_Proxy_Impl::_TAO_ReplyHandler_Direct_Proxy_Impl (void)
{}
//
// End Direct Proxy Implementation
///////////////////////////////////////////////////////////////////////
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:97
POA_Messaging::ReplyHandler::ReplyHandler (void)
{
this->optable_ = &tao_Messaging_ReplyHandler_optable;
}
POA_Messaging::ReplyHandler::ReplyHandler (const ReplyHandler& rhs)
: TAO_Abstract_ServantBase (rhs),
TAO_ServantBase (rhs)
{
}
POA_Messaging::ReplyHandler::~ReplyHandler (void)
{
}
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:162
void POA_Messaging::ReplyHandler::_is_a_skel (
TAO_ServerRequest &_tao_server_request,
void * _tao_servant,
void * /* Servant_Upcall */
ACE_ENV_ARG_DECL
)
{
TAO_InputCDR &_tao_in = _tao_server_request.incoming ();
POA_Messaging::ReplyHandler *_tao_impl = (POA_Messaging::ReplyHandler *) _tao_servant;
CORBA::Boolean _tao_retval = 0;
CORBA::String_var value;
if (!(_tao_in >> value.out ()))
ACE_THROW (CORBA::MARSHAL ());
_tao_retval = _tao_impl->_is_a (value.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
_tao_server_request.init_reply ();
TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval)))
ACE_THROW (CORBA::MARSHAL ());
}
void POA_Messaging::ReplyHandler::_non_existent_skel (
TAO_ServerRequest &_tao_server_request,
void * _tao_servant,
void * /* Servant_Upcall */
ACE_ENV_ARG_DECL
)
{
POA_Messaging::ReplyHandler *_tao_impl = (POA_Messaging::ReplyHandler *) _tao_servant;
CORBA::Boolean _tao_retval =
_tao_impl->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
_tao_server_request.init_reply ();
TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
if (!(_tao_out << CORBA::Any::from_boolean (_tao_retval)))
ACE_THROW (CORBA::MARSHAL ());
}
void POA_Messaging::ReplyHandler::_interface_skel (
TAO_ServerRequest &_tao_server_request,
void * _tao_servant,
void * /* Servant_Upcall */
ACE_ENV_ARG_DECL
)
{
POA_Messaging::ReplyHandler *_tao_impl = (POA_Messaging::ReplyHandler *) _tao_servant;
CORBA::InterfaceDef_ptr _tao_retval = 0;
CORBA::Boolean _tao_result = 0;
TAO_IFR_Client_Adapter *_tao_adapter =
ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
TAO_ORB_Core::ifr_client_adapter_name ()
);
if (_tao_adapter == 0)
{
ACE_THROW (CORBA::INTF_REPOS ());
}
ACE_TRY
{
_tao_retval =
_tao_impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
_tao_server_request.init_reply ();
TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
_tao_result =
_tao_adapter->interfacedef_cdr_insert (
_tao_out,
_tao_retval
);
}
ACE_CATCHALL
{
_tao_adapter->dispose (_tao_retval);
}
ACE_ENDTRY;
if (_tao_result == 0)
{
ACE_THROW (CORBA::MARSHAL ());
}
}
void POA_Messaging::ReplyHandler::_component_skel (
TAO_ServerRequest &_tao_server_request,
void * _tao_object_reference,
void * /* Servant_Upcall */
ACE_ENV_ARG_DECL
)
{
POA_Messaging::ReplyHandler *_tao_impl = (POA_Messaging::ReplyHandler *) _tao_object_reference;
CORBA::Object_var _tao_retval =
_tao_impl->_get_component (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
_tao_server_request.init_reply ();
TAO_OutputCDR &_tao_out = _tao_server_request.outgoing ();
if (!(_tao_out << _tao_retval._retn ()))
ACE_THROW (CORBA::MARSHAL ());
}
CORBA::Boolean POA_Messaging::ReplyHandler::_is_a (
const char* value
ACE_ENV_ARG_DECL_NOT_USED
)
{
if (
!ACE_OS::strcmp (
(char *)value,
"IDL:omg.org/Messaging/ReplyHandler:1.0"
) ||
!ACE_OS::strcmp (
(char *)value,
"IDL:org.omg/CORBA/Object:1.0"
)
)
{
return 1;
}
else
{
return 0;
}
}
void* POA_Messaging::ReplyHandler::_downcast (
const char* logical_type_id
)
{
if (ACE_OS::strcmp (logical_type_id,
"IDL:omg.org/Messaging/ReplyHandler:1.0") == 0)
{
return ACE_static_cast (POA_Messaging::ReplyHandler_ptr, this);
}
if (ACE_OS::strcmp (logical_type_id,
"IDL:omg.org/CORBA/Object:1.0") == 0)
{
return ACE_static_cast(PortableServer::Servant, this);
}
return 0;
}
const char* POA_Messaging::ReplyHandler::_interface_repository_id (void) const
{
return "IDL:omg.org/Messaging/ReplyHandler:1.0";
}
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:536
void POA_Messaging::ReplyHandler::_dispatch (
TAO_ServerRequest &req,
void *servant_upcall
ACE_ENV_ARG_DECL
)
{
this->synchronous_upcall_dispatch (req,
servant_upcall,
this
ACE_ENV_ARG_PARAMETER);
}
// TAO_IDL - Generated from
// be/be_visitor_interface/interface_ss.cpp:476
Messaging::ReplyHandler *
POA_Messaging::ReplyHandler::_this (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
TAO_Stub_Auto_Ptr safe_stub (stub);
CORBA::Object_ptr tmp = CORBA::Object::_nil ();
if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ())
{
ACE_NEW_RETURN (
tmp,
CORBA::Object (
stub,
1,
this
),
0
);
}
else
{
ACE_NEW_RETURN (
tmp,
CORBA::Object (
stub,
0,
this
),
0
);
}
CORBA::Object_var obj = tmp;
(void) safe_stub.release ();
typedef ::Messaging::ReplyHandler STUB_SCOPED_NAME;
return
TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow (
obj.in (),
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function_pointer
);
}
#endif /* ifndef */
|