00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _TAO_IDL_ORIG_POLICYS_CPP_
00033 #define _TAO_IDL_ORIG_POLICYS_CPP_
00034
00035
00036 #include "tao/AnyTypeCode/TypeCode.h"
00037 #include "tao/AnyTypeCode/Any.h"
00038 #include "tao/PortableServer/PolicyS.h"
00039 #include "tao/PortableServer/Operation_Table_Perfect_Hash.h"
00040 #include "tao/PortableServer/Direct_Collocation_Upcall_Wrapper.h"
00041 #include "tao/PortableServer/Upcall_Command.h"
00042 #include "tao/PortableServer/Upcall_Wrapper.h"
00043 #include "tao/PortableServer/Basic_SArguments.h"
00044 #include "tao/PortableServer/Object_SArgument_T.h"
00045 #include "tao/PortableServer/Special_Basic_SArguments.h"
00046 #include "tao/PortableServer/UB_String_SArguments.h"
00047 #include "tao/PortableServer/TypeCode_SArg_Traits.h"
00048 #include "tao/PortableServer/Object_SArg_Traits.h"
00049 #include "tao/PortableServer/get_arg.h"
00050 #include "tao/Special_Basic_Arguments.h"
00051 #include "tao/UB_String_Arguments.h"
00052 #include "tao/TAO_Server_Request.h"
00053 #include "tao/ORB_Core.h"
00054 #include "tao/Profile.h"
00055 #include "tao/Stub.h"
00056 #include "tao/IFR_Client_Adapter.h"
00057 #include "tao/Object_T.h"
00058 #include "tao/CDR.h"
00059 #include "tao/operation_details.h"
00060 #include "tao/PortableInterceptor.h"
00061 #include "tao/Basic_Arguments.h"
00062 #include "tao/Object_Argument_T.h"
00063 #include "ace/Dynamic_Service.h"
00064 #include "ace/Malloc_Allocator.h"
00065
00066
00067
00068
00069 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00070
00071
00072 namespace TAO
00073 {
00074
00075 #if !defined (_CORBA_POLICY__SARG_TRAITS_SS_)
00076 #define _CORBA_POLICY__SARG_TRAITS_SS_
00077
00078 template<>
00079 class SArg_Traits<CORBA::Policy>
00080 : public
00081 Object_SArg_Traits_T<
00082 CORBA::Policy_ptr,
00083 CORBA::Policy_var,
00084 CORBA::Policy_out,
00085 TAO::Any_Insert_Policy_Stream <CORBA::Policy_ptr>
00086 >
00087 {
00088 };
00089
00090 #endif
00091 }
00092
00093
00094
00095
00096
00097
00098 namespace TAO
00099 {
00100
00101 #if !defined (_CORBA_POLICY__ARG_TRAITS_SS_)
00102 #define _CORBA_POLICY__ARG_TRAITS_SS_
00103
00104 template<>
00105 class Arg_Traits<CORBA::Policy>
00106 : public
00107 Object_Arg_Traits_T<
00108 CORBA::Policy_ptr,
00109 CORBA::Policy_var,
00110 CORBA::Policy_out,
00111 TAO::Objref_Traits<CORBA::Policy>,
00112 TAO::Any_Insert_Policy_Stream <CORBA::Policy_ptr>
00113 >
00114 {
00115 };
00116
00117 #endif
00118 }
00119
00120
00121
00122
00123
00124 class TAO_CORBA_Policy_Perfect_Hash_OpTable
00125 : public TAO_Perfect_Hash_OpTable
00126 {
00127 private:
00128 unsigned int hash (const char *str, unsigned int len);
00129
00130 public:
00131 const TAO_operation_db_entry * lookup (const char *str, unsigned int len);
00132 };
00133
00134
00135
00136 unsigned int
00137 TAO_CORBA_Policy_Perfect_Hash_OpTable::hash (const char *str, unsigned int len)
00138 {
00139 static const unsigned char asso_values[] =
00140 {
00141 #if defined (ACE_MVS)
00142 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00143 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00144 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00145 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00146 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00147 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00148 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00149 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00150 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00151 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00152 22, 22, 22, 22, 22, 22, 22, 22, 22, 0,
00153 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00154 22, 22, 22, 22, 22, 22, 22, 22, 22, 0,
00155 22, 0, 0, 5, 22, 22, 22, 22, 22, 22,
00156 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00157 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00158 22, 22, 22, 0, 22, 22, 22, 22, 0, 22,
00159 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00160 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00161 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00162 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00163 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00164 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00165 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00166 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00167 22, 22, 22, 22, 22, 22,
00168 #else
00169 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00170 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00171 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00172 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00173 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00174 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00175 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00176 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00177 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
00178 22, 22, 22, 22, 22, 0, 22, 0, 22, 0,
00179 0, 5, 22, 22, 22, 22, 22, 22, 22, 22,
00180 22, 22, 22, 22, 22, 22, 0, 22, 22, 22,
00181 22, 0, 22, 22, 22, 22, 22, 22,
00182 #endif
00183 };
00184 return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]];
00185 }
00186
00187 const TAO_operation_db_entry *
00188 TAO_CORBA_Policy_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len)
00189 {
00190 enum
00191 {
00192 TOTAL_KEYWORDS = 7,
00193 MIN_WORD_LENGTH = 4,
00194 MAX_WORD_LENGTH = 16,
00195 MIN_HASH_VALUE = 4,
00196 MAX_HASH_VALUE = 21,
00197 HASH_VALUE_RANGE = 18,
00198 DUPLICATES = 0,
00199 WORDLIST_SIZE = 11
00200 };
00201
00202 static const TAO_operation_db_entry wordlist[] =
00203 {
00204 {"",0,0},{"",0,0},{"",0,0},{"",0,0},
00205 {"copy", &POA_CORBA::Policy::copy_skel, &POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::copy},
00206 {"_is_a", &POA_CORBA::Policy::_is_a_skel, 0},
00207 {"",0,0},
00208 {"destroy", &POA_CORBA::Policy::destroy_skel, &POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::destroy},
00209 {"",0,0},{"",0,0},
00210 {"_component", &POA_CORBA::Policy::_component_skel, 0},
00211 {"",0,0},{"",0,0},
00212 {"_non_existent", &POA_CORBA::Policy::_non_existent_skel, 0},
00213 {"",0,0},
00214 {"_interface", &POA_CORBA::Policy::_interface_skel, 0},
00215 {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0},
00216 {"_get_policy_type", &POA_CORBA::Policy::_get_policy_type_skel, &POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::_get_policy_type},
00217 };
00218
00219 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
00220 {
00221 unsigned int key = hash (str, len);
00222
00223 if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
00224 {
00225 const char *s = wordlist[key].opname;
00226
00227 if (*str == *s && !strncmp (str + 1, s + 1, len - 1))
00228 return &wordlist[key];
00229 }
00230 }
00231 return 0;
00232 }
00233
00234 static TAO_CORBA_Policy_Perfect_Hash_OpTable tao_CORBA_Policy_optable;
00235
00236
00237
00238
00239
00240
00241
00242
00243 POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker *
00244 POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::the_TAO_Policy_Strategized_Proxy_Broker (void)
00245 {
00246 static POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker
00247 strategized_proxy_broker;
00248
00249 return &strategized_proxy_broker;
00250 }
00251
00252 POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::_TAO_Policy_Strategized_Proxy_Broker (void)
00253 {
00254 }
00255
00256 POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::~_TAO_Policy_Strategized_Proxy_Broker (void)
00257 {
00258 }
00259
00260 TAO::Collocation_Strategy
00261 POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::get_strategy (
00262 CORBA::Object_ptr obj
00263
00264 )
00265 {
00266 TAO::Collocation_Strategy strategy =
00267 TAO_ORB_Core::collocation_strategy (obj);
00268
00269 return strategy;
00270 }
00271
00272 void
00273 POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::dispatch (
00274 CORBA::Object_ptr obj,
00275 CORBA::Object_out forward_obj,
00276 bool & is_forwarded,
00277 TAO::Argument ** args,
00278 int num_args,
00279 const char * op,
00280 size_t op_len,
00281 TAO::Collocation_Strategy strategy
00282
00283 )
00284 {
00285 TAO::Direct_Collocation_Upcall_Wrapper collocation_upcall_wrapper;
00286 collocation_upcall_wrapper.upcall (
00287 obj,
00288 forward_obj,
00289 is_forwarded,
00290 args,
00291 num_args,
00292 op,
00293 op_len,
00294 strategy
00295 );
00296 }
00297
00298
00299
00300
00301
00302
00303
00304
00305 TAO::Collocation_Proxy_Broker *
00306 CORBA__TAO_Policy_Proxy_Broker_Factory_function (CORBA::Object_ptr)
00307 {
00308 return
00309 ::POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::the_TAO_Policy_Strategized_Proxy_Broker ();
00310 }
00311
00312 int
00313 CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (size_t)
00314 {
00315 CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer =
00316 CORBA__TAO_Policy_Proxy_Broker_Factory_function;
00317
00318 return 0;
00319 }
00320
00321 static int
00322 CORBA__TAO_Policy_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
00323 CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (
00324 reinterpret_cast<size_t> (CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer)
00325 );
00326
00327
00328
00329
00330
00331
00332
00333 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::_TAO_Policy_Direct_Proxy_Impl (void)
00334 {}
00335
00336 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::~_TAO_Policy_Direct_Proxy_Impl (void)
00337 {}
00338
00339
00340
00341
00342 void
00343 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::_get_policy_type (
00344 TAO_Abstract_ServantBase *servant,
00345 TAO::Argument ** args,
00346 int
00347
00348 )
00349 {
00350 ((TAO::Arg_Traits< ::CORBA::PolicyType>::ret_val *) args[0])->arg () =
00351 dynamic_cast<POA_CORBA::Policy_ptr>
00352 (servant)
00353 ->policy_type (
00354
00355 );
00356 }
00357
00358
00359
00360 void
00361 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::copy (
00362 TAO_Abstract_ServantBase *servant,
00363 TAO::Argument ** args,
00364 int
00365
00366 )
00367 {
00368 ((TAO::Arg_Traits< CORBA::Policy>::ret_val *) args[0])->arg () =
00369 dynamic_cast<POA_CORBA::Policy_ptr>
00370 (servant)
00371 ->copy (
00372
00373 );
00374 }
00375
00376
00377
00378 void
00379 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::destroy (
00380 TAO_Abstract_ServantBase *servant,
00381 TAO::Argument **,
00382 int
00383 )
00384 {
00385 dynamic_cast<POA_CORBA::Policy_ptr>
00386 (servant)
00387 ->destroy (
00388
00389 );
00390 }
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400 POA_CORBA::Policy::Policy (void)
00401 : TAO_ServantBase ()
00402 {
00403 this->optable_ = &tao_CORBA_Policy_optable;
00404 }
00405
00406 POA_CORBA::Policy::Policy (const Policy& rhs)
00407 : TAO_Abstract_ServantBase (rhs),
00408 TAO_ServantBase (rhs)
00409 {
00410 }
00411
00412 POA_CORBA::Policy::~Policy (void)
00413 {
00414 }
00415 namespace POA_CORBA
00416 {
00417
00418
00419
00420
00421
00422 class _get_policy_type_Policy
00423 : public TAO::Upcall_Command
00424 {
00425 public:
00426 inline _get_policy_type_Policy (
00427 POA_CORBA::Policy * servant,
00428 TAO_Operation_Details const * operation_details,
00429 TAO::Argument * const args[])
00430 : servant_ (servant)
00431 , operation_details_ (operation_details)
00432 , args_ (args)
00433 {
00434 }
00435
00436 virtual void execute (void)
00437 {
00438 TAO::SArg_Traits< ::CORBA::PolicyType>::ret_arg_type retval =
00439 TAO::Portable_Server::get_ret_arg< ::CORBA::PolicyType> (
00440 this->operation_details_,
00441 this->args_);
00442
00443
00444 retval =
00445 this->servant_->policy_type (
00446 );
00447
00448 }
00449
00450 private:
00451 POA_CORBA::Policy * const servant_;
00452 TAO_Operation_Details const * const operation_details_;
00453 TAO::Argument * const * const args_;
00454 };
00455
00456 }
00457
00458
00459
00460
00461
00462 void POA_CORBA::Policy::_get_policy_type_skel (
00463 TAO_ServerRequest & server_request,
00464 void * TAO_INTERCEPTOR (servant_upcall),
00465 void * servant
00466
00467 )
00468 {
00469
00470
00471 #if TAO_HAS_INTERCEPTORS == 1
00472 static CORBA::TypeCode_ptr const * const exceptions = 0;
00473 static CORBA::ULong const nexceptions = 0;
00474 #endif
00475
00476 TAO::SArg_Traits< ::CORBA::PolicyType>::ret_val retval;
00477
00478 TAO::Argument * const args[] =
00479 {
00480 &retval
00481 };
00482
00483 static size_t const nargs = 1;
00484
00485 POA_CORBA::Policy * const impl =
00486 static_cast<POA_CORBA::Policy *> (servant);
00487
00488 _get_policy_type_Policy command (
00489 impl,
00490 server_request.operation_details (),
00491 args);
00492
00493 TAO::Upcall_Wrapper upcall_wrapper;
00494 upcall_wrapper.upcall (server_request
00495 , args
00496 , nargs
00497 , command
00498 #if TAO_HAS_INTERCEPTORS == 1
00499 , servant_upcall
00500 , exceptions
00501 , nexceptions
00502 #endif
00503 );
00504
00505 }
00506 namespace POA_CORBA
00507 {
00508
00509
00510
00511
00512
00513 class copy_Policy
00514 : public TAO::Upcall_Command
00515 {
00516 public:
00517 inline copy_Policy (
00518 POA_CORBA::Policy * servant,
00519 TAO_Operation_Details const * operation_details,
00520 TAO::Argument * const args[])
00521 : servant_ (servant)
00522 , operation_details_ (operation_details)
00523 , args_ (args)
00524 {
00525 }
00526
00527 virtual void execute (void)
00528 {
00529 TAO::SArg_Traits< CORBA::Policy>::ret_arg_type retval =
00530 TAO::Portable_Server::get_ret_arg< CORBA::Policy> (
00531 this->operation_details_,
00532 this->args_);
00533
00534
00535 retval =
00536 this->servant_->copy (
00537 );
00538
00539 }
00540
00541 private:
00542 POA_CORBA::Policy * const servant_;
00543 TAO_Operation_Details const * const operation_details_;
00544 TAO::Argument * const * const args_;
00545 };
00546
00547 }
00548
00549
00550
00551
00552
00553 void POA_CORBA::Policy::copy_skel (
00554 TAO_ServerRequest & server_request,
00555 void * TAO_INTERCEPTOR (servant_upcall),
00556 void * servant
00557
00558 )
00559 {
00560
00561
00562 #if TAO_HAS_INTERCEPTORS == 1
00563 static CORBA::TypeCode_ptr const * const exceptions = 0;
00564 static CORBA::ULong const nexceptions = 0;
00565 #endif
00566
00567 TAO::SArg_Traits< CORBA::Policy>::ret_val retval;
00568
00569 TAO::Argument * const args[] =
00570 {
00571 &retval
00572 };
00573
00574 static size_t const nargs = 1;
00575
00576 POA_CORBA::Policy * const impl =
00577 static_cast<POA_CORBA::Policy *> (servant);
00578
00579 copy_Policy command (
00580 impl,
00581 server_request.operation_details (),
00582 args);
00583
00584 TAO::Upcall_Wrapper upcall_wrapper;
00585 upcall_wrapper.upcall (server_request
00586 , args
00587 , nargs
00588 , command
00589 #if TAO_HAS_INTERCEPTORS == 1
00590 , servant_upcall
00591 , exceptions
00592 , nexceptions
00593 #endif
00594 );
00595
00596 }
00597 namespace POA_CORBA
00598 {
00599
00600
00601
00602
00603
00604 class destroy_Policy
00605 : public TAO::Upcall_Command
00606 {
00607 public:
00608 inline destroy_Policy (
00609 POA_CORBA::Policy * servant)
00610 : servant_ (servant)
00611 {
00612 }
00613
00614 virtual void execute (void)
00615 {
00616 this->servant_->destroy (
00617 );
00618
00619 }
00620
00621 private:
00622 POA_CORBA::Policy * const servant_;
00623 };
00624
00625 }
00626
00627
00628
00629
00630
00631 void POA_CORBA::Policy::destroy_skel (
00632 TAO_ServerRequest & server_request,
00633 void * TAO_INTERCEPTOR (servant_upcall),
00634 void * servant
00635
00636 )
00637 {
00638
00639
00640 #if TAO_HAS_INTERCEPTORS == 1
00641 static CORBA::TypeCode_ptr const * const exceptions = 0;
00642 static CORBA::ULong const nexceptions = 0;
00643 #endif
00644
00645 TAO::SArg_Traits< void>::ret_val retval;
00646
00647 TAO::Argument * const args[] =
00648 {
00649 &retval
00650 };
00651
00652 static size_t const nargs = 1;
00653
00654 POA_CORBA::Policy * const impl =
00655 static_cast<POA_CORBA::Policy *> (servant);
00656
00657 destroy_Policy command (
00658 impl);
00659
00660 TAO::Upcall_Wrapper upcall_wrapper;
00661 upcall_wrapper.upcall (server_request
00662 , args
00663 , nargs
00664 , command
00665 #if TAO_HAS_INTERCEPTORS == 1
00666 , servant_upcall
00667 , exceptions
00668 , nexceptions
00669 #endif
00670 );
00671
00672 }
00673
00674
00675
00676
00677 namespace POA_CORBA
00678 {
00679
00680
00681
00682
00683
00684 class _is_a_Policy_Upcall_Command
00685 : public TAO::Upcall_Command
00686 {
00687 public:
00688 inline _is_a_Policy_Upcall_Command (
00689 POA_CORBA::Policy * servant,
00690 TAO_Operation_Details const * operation_details,
00691 TAO::Argument * const args[])
00692 : servant_ (servant)
00693 , operation_details_ (operation_details)
00694 , args_ (args)
00695 {
00696 }
00697
00698 virtual void execute (void)
00699 {
00700 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval =
00701 TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean> (
00702 this->operation_details_,
00703 this->args_);
00704
00705 TAO::SArg_Traits< CORBA::Char *>::in_arg_type arg_1 =
00706 TAO::Portable_Server::get_in_arg< CORBA::Char *> (
00707 this->operation_details_,
00708 this->args_,
00709 1);
00710
00711
00712 retval =
00713 this->servant_-> _is_a (
00714 arg_1
00715 );
00716
00717 }
00718
00719 private:
00720 POA_CORBA::Policy * const servant_;
00721 TAO_Operation_Details const * const operation_details_;
00722 TAO::Argument * const * const args_;
00723 };
00724
00725 }
00726 void POA_CORBA::Policy::_is_a_skel (
00727 TAO_ServerRequest & server_request,
00728 void * TAO_INTERCEPTOR (servant_upcall),
00729 void * servant
00730
00731 )
00732 {
00733
00734
00735 #if TAO_HAS_INTERCEPTORS == 1
00736 static CORBA::TypeCode_ptr const * const exceptions = 0;
00737 static CORBA::ULong const nexceptions = 0;
00738 #endif
00739
00740 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval;
00741 TAO::SArg_Traits< CORBA::Char *>::in_arg_val _tao_repository_id;
00742
00743 TAO::Argument * const args[] =
00744 {
00745 &retval,
00746 &_tao_repository_id
00747 };
00748
00749 static size_t const nargs = 2;
00750
00751 POA_CORBA::Policy * const impl =
00752 static_cast<POA_CORBA::Policy *> (servant);
00753
00754 _is_a_Policy_Upcall_Command command (
00755 impl,
00756 server_request.operation_details (),
00757 args);
00758
00759 TAO::Upcall_Wrapper upcall_wrapper;
00760 upcall_wrapper.upcall (server_request
00761 , args
00762 , nargs
00763 , command
00764 #if TAO_HAS_INTERCEPTORS == 1
00765 , servant_upcall
00766 , exceptions
00767 , nexceptions
00768 #endif
00769 );
00770
00771 }
00772
00773 namespace POA_CORBA
00774 {
00775
00776
00777
00778
00779
00780 class _non_existent_Policy_Upcall_Command
00781 : public TAO::Upcall_Command
00782 {
00783 public:
00784 inline _non_existent_Policy_Upcall_Command (
00785 POA_CORBA::Policy * servant,
00786 TAO_Operation_Details const * operation_details,
00787 TAO::Argument * const args[])
00788 : servant_ (servant)
00789 , operation_details_ (operation_details)
00790 , args_ (args)
00791 {
00792 }
00793
00794 virtual void execute (void)
00795 {
00796 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval =
00797 TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean> (
00798 this->operation_details_,
00799 this->args_);
00800
00801
00802 retval =
00803 this->servant_-> _non_existent (
00804 );
00805
00806 }
00807
00808 private:
00809 POA_CORBA::Policy * const servant_;
00810 TAO_Operation_Details const * const operation_details_;
00811 TAO::Argument * const * const args_;
00812 };
00813
00814 }
00815 void POA_CORBA::Policy::_non_existent_skel (
00816 TAO_ServerRequest & server_request,
00817 void * TAO_INTERCEPTOR (servant_upcall),
00818 void * servant
00819
00820 )
00821 {
00822
00823
00824 #if TAO_HAS_INTERCEPTORS == 1
00825 static CORBA::TypeCode_ptr const * const exceptions = 0;
00826 static CORBA::ULong const nexceptions = 0;
00827 #endif
00828
00829 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval;
00830
00831 TAO::Argument * const args[] =
00832 {
00833 &retval
00834 };
00835
00836 static size_t const nargs = 1;
00837
00838 POA_CORBA::Policy * const impl =
00839 static_cast<POA_CORBA::Policy *> (servant);
00840
00841 _non_existent_Policy_Upcall_Command command (
00842 impl,
00843 server_request.operation_details (),
00844 args);
00845
00846 TAO::Upcall_Wrapper upcall_wrapper;
00847 upcall_wrapper.upcall (server_request
00848 , args
00849 , nargs
00850 , command
00851 #if TAO_HAS_INTERCEPTORS == 1
00852 , servant_upcall
00853 , exceptions
00854 , nexceptions
00855 #endif
00856 );
00857
00858 }
00859
00860
00861
00862
00863
00864
00865
00866
00867 void POA_CORBA::Policy::_interface_skel (
00868 TAO_ServerRequest & server_request,
00869 void * ,
00870 void * servant
00871
00872 )
00873 {
00874 TAO_IFR_Client_Adapter *_tao_adapter =
00875 ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
00876 TAO_ORB_Core::ifr_client_adapter_name ()
00877 );
00878
00879 if (_tao_adapter == 0)
00880 {
00881 throw ::CORBA::INTF_REPOS (CORBA::OMGVMCID | 1, CORBA::COMPLETED_NO);
00882 }
00883
00884 POA_CORBA::Policy * const impl =
00885 static_cast<POA_CORBA::Policy *> (servant);
00886 CORBA::InterfaceDef_ptr _tao_retval =
00887 impl->_get_interface ();
00888
00889 server_request.init_reply ();
00890 TAO_OutputCDR &_tao_out = *server_request.outgoing ();
00891
00892 CORBA::Boolean const _tao_result =
00893 _tao_adapter->interfacedef_cdr_insert (
00894 _tao_out,
00895 _tao_retval
00896 );
00897
00898 _tao_adapter->dispose (_tao_retval);
00899
00900 if (_tao_result == 0)
00901 {
00902 throw ::CORBA::MARSHAL ();
00903 }
00904 }
00905
00906 namespace POA_CORBA
00907 {
00908
00909
00910
00911
00912
00913 class _get_component_Policy_Upcall_Command
00914 : public TAO::Upcall_Command
00915 {
00916 public:
00917 inline _get_component_Policy_Upcall_Command (
00918 POA_CORBA::Policy * servant,
00919 TAO_Operation_Details const * operation_details,
00920 TAO::Argument * const args[])
00921 : servant_ (servant)
00922 , operation_details_ (operation_details)
00923 , args_ (args)
00924 {
00925 }
00926
00927 virtual void execute (void)
00928 {
00929 TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval =
00930 TAO::Portable_Server::get_ret_arg< ::CORBA::Object> (
00931 this->operation_details_,
00932 this->args_);
00933
00934
00935 retval =
00936 this->servant_-> _get_component (
00937 );
00938
00939 }
00940
00941 private:
00942 POA_CORBA::Policy * const servant_;
00943 TAO_Operation_Details const * const operation_details_;
00944 TAO::Argument * const * const args_;
00945 };
00946
00947 }
00948 void POA_CORBA::Policy::_component_skel (
00949 TAO_ServerRequest & server_request,
00950 void * TAO_INTERCEPTOR (servant_upcall),
00951 void * servant
00952
00953 )
00954 {
00955
00956
00957 #if TAO_HAS_INTERCEPTORS == 1
00958 static CORBA::TypeCode_ptr const * const exceptions = 0;
00959 static CORBA::ULong const nexceptions = 0;
00960 #endif
00961
00962 TAO::SArg_Traits< ::CORBA::Object>::ret_val retval;
00963
00964 TAO::Argument * const args[] =
00965 {
00966 &retval
00967 };
00968
00969 static size_t const nargs = 1;
00970
00971 POA_CORBA::Policy * const impl =
00972 static_cast<POA_CORBA::Policy *> (servant);
00973
00974 _get_component_Policy_Upcall_Command command (
00975 impl,
00976 server_request.operation_details (),
00977 args);
00978
00979 TAO::Upcall_Wrapper upcall_wrapper;
00980 upcall_wrapper.upcall (server_request
00981 , args
00982 , nargs
00983 , command
00984 #if TAO_HAS_INTERCEPTORS == 1
00985 , servant_upcall
00986 , exceptions
00987 , nexceptions
00988 #endif
00989 );
00990
00991 }
00992
00993 CORBA::Boolean POA_CORBA::Policy::_is_a (
00994 const char* value
00995
00996 )
00997 {
00998 return
00999 (
01000 !ACE_OS::strcmp (
01001 value,
01002 "IDL:omg.org/CORBA/Policy:1.0"
01003 ) ||
01004 !ACE_OS::strcmp (
01005 value,
01006 "IDL:omg.org/CORBA/Object:1.0"
01007 )
01008 );
01009 }
01010
01011 const char* POA_CORBA::Policy::_interface_repository_id (void) const
01012 {
01013 return "IDL:omg.org/CORBA/Policy:1.0";
01014 }
01015
01016
01017
01018
01019 void POA_CORBA::Policy::_dispatch (
01020 TAO_ServerRequest & req,
01021 void * servant_upcall
01022
01023 )
01024 {
01025 this->synchronous_upcall_dispatch (req,
01026 servant_upcall,
01027 this
01028 );
01029 }
01030
01031
01032
01033
01034 CORBA::Policy *
01035 POA_CORBA::Policy::_this (void)
01036 {
01037 TAO_Stub *stub = this->_create_stub ();
01038
01039 TAO_Stub_Auto_Ptr safe_stub (stub);
01040 CORBA::Object_ptr tmp = CORBA::Object::_nil ();
01041
01042 CORBA::Boolean _tao_opt_colloc =
01043 stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ();
01044
01045 ACE_NEW_RETURN (
01046 tmp,
01047 CORBA::Object (stub, _tao_opt_colloc, this),
01048 0
01049 );
01050
01051 CORBA::Object_var obj = tmp;
01052 (void) safe_stub.release ();
01053
01054 typedef ::CORBA::Policy STUB_SCOPED_NAME;
01055 return
01056 TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow (
01057 obj.in (),
01058 CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer
01059 );
01060 }
01061
01062 #endif
01063
01064
01065 TAO_END_VERSIONED_NAMESPACE_DECL