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 ACE_ENV_ARG_DECL
00264 )
00265 ACE_THROW_SPEC ((CORBA::SystemException))
00266 {
00267 TAO::Collocation_Strategy strategy =
00268 TAO_ORB_Core::collocation_strategy (obj ACE_ENV_ARG_PARAMETER);
00269 ACE_CHECK_RETURN (TAO::TAO_CS_REMOTE_STRATEGY);
00270
00271 return strategy;
00272 }
00273
00274 void
00275 POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::dispatch (
00276 CORBA::Object_ptr obj,
00277 CORBA::Object_out forward_obj,
00278 TAO::Argument ** args,
00279 int num_args,
00280 const char * op,
00281 size_t op_len,
00282 TAO::Collocation_Strategy strategy
00283 ACE_ENV_ARG_DECL
00284 )
00285 ACE_THROW_SPEC ((CORBA::Exception))
00286 {
00287 TAO::Direct_Collocation_Upcall_Wrapper collocation_upcall_wrapper;
00288 collocation_upcall_wrapper.upcall (
00289 obj,
00290 forward_obj,
00291 args,
00292 num_args,
00293 op,
00294 op_len,
00295 strategy
00296 ACE_ENV_ARG_PARAMETER);
00297 }
00298
00299
00300
00301
00302
00303
00304
00305
00306 TAO::Collocation_Proxy_Broker *
00307 CORBA__TAO_Policy_Proxy_Broker_Factory_function (CORBA::Object_ptr)
00308 {
00309 return
00310 ::POA_CORBA::_TAO_Policy_Strategized_Proxy_Broker::the_TAO_Policy_Strategized_Proxy_Broker ();
00311 }
00312
00313 int
00314 CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (size_t)
00315 {
00316 CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer =
00317 CORBA__TAO_Policy_Proxy_Broker_Factory_function;
00318
00319 return 0;
00320 }
00321
00322 static int
00323 CORBA__TAO_Policy_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
00324 CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (
00325 reinterpret_cast<size_t> (CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer)
00326 );
00327
00328
00329
00330
00331
00332
00333
00334 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::_TAO_Policy_Direct_Proxy_Impl (void)
00335 {}
00336
00337 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::~_TAO_Policy_Direct_Proxy_Impl (void)
00338 {}
00339
00340
00341
00342
00343 void
00344 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::_get_policy_type (
00345 TAO_Abstract_ServantBase *servant,
00346 TAO::Argument ** args,
00347 int
00348 ACE_ENV_ARG_DECL
00349 )
00350 ACE_THROW_SPEC ((
00351 CORBA::SystemException
00352 ))
00353 {
00354 ((TAO::Arg_Traits< ::CORBA::PolicyType>::ret_val *) args[0])->arg () =
00355 dynamic_cast<POA_CORBA::Policy_ptr>
00356 (servant)
00357 ->policy_type (
00358 ACE_ENV_SINGLE_ARG_PARAMETER
00359 );
00360 ACE_CHECK;
00361 }
00362
00363
00364
00365 void
00366 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::copy (
00367 TAO_Abstract_ServantBase *servant,
00368 TAO::Argument ** args,
00369 int
00370 ACE_ENV_ARG_DECL
00371 )
00372 ACE_THROW_SPEC ((
00373 CORBA::SystemException
00374 ))
00375 {
00376 ((TAO::Arg_Traits< CORBA::Policy>::ret_val *) args[0])->arg () =
00377 dynamic_cast<POA_CORBA::Policy_ptr>
00378 (servant)
00379 ->copy (
00380 ACE_ENV_SINGLE_ARG_PARAMETER
00381 );
00382 ACE_CHECK;
00383 }
00384
00385
00386
00387 void
00388 POA_CORBA::_TAO_Policy_Direct_Proxy_Impl::destroy (
00389 TAO_Abstract_ServantBase *servant,
00390 TAO::Argument **,
00391 int
00392 ACE_ENV_ARG_DECL
00393 )
00394 ACE_THROW_SPEC ((
00395 CORBA::SystemException
00396 ))
00397 {
00398 dynamic_cast<POA_CORBA::Policy_ptr>
00399 (servant)
00400 ->destroy (
00401 ACE_ENV_SINGLE_ARG_PARAMETER
00402 );
00403 ACE_CHECK;
00404 }
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414 POA_CORBA::Policy::Policy (void)
00415 : TAO_ServantBase ()
00416 {
00417 this->optable_ = &tao_CORBA_Policy_optable;
00418 }
00419
00420 POA_CORBA::Policy::Policy (const Policy& rhs)
00421 : TAO_Abstract_ServantBase (rhs),
00422 TAO_ServantBase (rhs)
00423 {
00424 }
00425
00426 POA_CORBA::Policy::~Policy (void)
00427 {
00428 }
00429 namespace POA_CORBA
00430 {
00431
00432
00433
00434
00435
00436 class _get_policy_type_Policy
00437 : public TAO::Upcall_Command
00438 {
00439 public:
00440 inline _get_policy_type_Policy (
00441 POA_CORBA::Policy * servant,
00442 TAO_Operation_Details const * operation_details,
00443 TAO::Argument * const args[])
00444 : servant_ (servant)
00445 , operation_details_ (operation_details)
00446 , args_ (args)
00447 {
00448 }
00449
00450 virtual void execute (ACE_ENV_SINGLE_ARG_DECL)
00451 {
00452 TAO::SArg_Traits< ::CORBA::PolicyType>::ret_arg_type retval =
00453 TAO::Portable_Server::get_ret_arg< ::CORBA::PolicyType> (
00454 this->operation_details_,
00455 this->args_);
00456
00457
00458 retval =
00459 this->servant_->policy_type (
00460 ACE_ENV_SINGLE_ARG_PARAMETER);
00461
00462 }
00463
00464 private:
00465 POA_CORBA::Policy * const servant_;
00466 TAO_Operation_Details const * const operation_details_;
00467 TAO::Argument * const * const args_;
00468 };
00469
00470 }
00471
00472
00473
00474
00475
00476 void POA_CORBA::Policy::_get_policy_type_skel (
00477 TAO_ServerRequest & server_request,
00478 void * TAO_INTERCEPTOR (servant_upcall),
00479 void * servant
00480 ACE_ENV_ARG_DECL
00481 )
00482 {
00483
00484
00485 #if TAO_HAS_INTERCEPTORS == 1
00486 static CORBA::TypeCode_ptr const * const exceptions = 0;
00487 static CORBA::ULong const nexceptions = 0;
00488 #endif
00489
00490 TAO::SArg_Traits< ::CORBA::PolicyType>::ret_val retval;
00491
00492 TAO::Argument * const args[] =
00493 {
00494 &retval
00495 };
00496
00497 static size_t const nargs = 1;
00498
00499 POA_CORBA::Policy * const impl =
00500 static_cast<POA_CORBA::Policy *> (servant);
00501
00502 _get_policy_type_Policy command (
00503 impl,
00504 server_request.operation_details (),
00505 args);
00506
00507 TAO::Upcall_Wrapper upcall_wrapper;
00508 upcall_wrapper.upcall (server_request
00509 , args
00510 , nargs
00511 , command
00512 #if TAO_HAS_INTERCEPTORS == 1
00513 , servant_upcall
00514 , exceptions
00515 , nexceptions
00516 #endif
00517 ACE_ENV_ARG_PARAMETER);
00518 ACE_CHECK;
00519
00520 }
00521 namespace POA_CORBA
00522 {
00523
00524
00525
00526
00527
00528 class copy_Policy
00529 : public TAO::Upcall_Command
00530 {
00531 public:
00532 inline copy_Policy (
00533 POA_CORBA::Policy * servant,
00534 TAO_Operation_Details const * operation_details,
00535 TAO::Argument * const args[])
00536 : servant_ (servant)
00537 , operation_details_ (operation_details)
00538 , args_ (args)
00539 {
00540 }
00541
00542 virtual void execute (ACE_ENV_SINGLE_ARG_DECL)
00543 {
00544 TAO::SArg_Traits< CORBA::Policy>::ret_arg_type retval =
00545 TAO::Portable_Server::get_ret_arg< CORBA::Policy> (
00546 this->operation_details_,
00547 this->args_);
00548
00549
00550 retval =
00551 this->servant_->copy (
00552 ACE_ENV_SINGLE_ARG_PARAMETER);
00553
00554 }
00555
00556 private:
00557 POA_CORBA::Policy * const servant_;
00558 TAO_Operation_Details const * const operation_details_;
00559 TAO::Argument * const * const args_;
00560 };
00561
00562 }
00563
00564
00565
00566
00567
00568 void POA_CORBA::Policy::copy_skel (
00569 TAO_ServerRequest & server_request,
00570 void * TAO_INTERCEPTOR (servant_upcall),
00571 void * servant
00572 ACE_ENV_ARG_DECL
00573 )
00574 {
00575
00576
00577 #if TAO_HAS_INTERCEPTORS == 1
00578 static CORBA::TypeCode_ptr const * const exceptions = 0;
00579 static CORBA::ULong const nexceptions = 0;
00580 #endif
00581
00582 TAO::SArg_Traits< CORBA::Policy>::ret_val retval;
00583
00584 TAO::Argument * const args[] =
00585 {
00586 &retval
00587 };
00588
00589 static size_t const nargs = 1;
00590
00591 POA_CORBA::Policy * const impl =
00592 static_cast<POA_CORBA::Policy *> (servant);
00593
00594 copy_Policy command (
00595 impl,
00596 server_request.operation_details (),
00597 args);
00598
00599 TAO::Upcall_Wrapper upcall_wrapper;
00600 upcall_wrapper.upcall (server_request
00601 , args
00602 , nargs
00603 , command
00604 #if TAO_HAS_INTERCEPTORS == 1
00605 , servant_upcall
00606 , exceptions
00607 , nexceptions
00608 #endif
00609 ACE_ENV_ARG_PARAMETER);
00610 ACE_CHECK;
00611
00612 }
00613 namespace POA_CORBA
00614 {
00615
00616
00617
00618
00619
00620 class destroy_Policy
00621 : public TAO::Upcall_Command
00622 {
00623 public:
00624 inline destroy_Policy (
00625 POA_CORBA::Policy * servant)
00626 : servant_ (servant)
00627 {
00628 }
00629
00630 virtual void execute (ACE_ENV_SINGLE_ARG_DECL)
00631 {
00632 this->servant_->destroy (
00633 ACE_ENV_SINGLE_ARG_PARAMETER);
00634
00635 }
00636
00637 private:
00638 POA_CORBA::Policy * const servant_;
00639 };
00640
00641 }
00642
00643
00644
00645
00646
00647 void POA_CORBA::Policy::destroy_skel (
00648 TAO_ServerRequest & server_request,
00649 void * TAO_INTERCEPTOR (servant_upcall),
00650 void * servant
00651 ACE_ENV_ARG_DECL
00652 )
00653 {
00654
00655
00656 #if TAO_HAS_INTERCEPTORS == 1
00657 static CORBA::TypeCode_ptr const * const exceptions = 0;
00658 static CORBA::ULong const nexceptions = 0;
00659 #endif
00660
00661 TAO::SArg_Traits< void>::ret_val retval;
00662
00663 TAO::Argument * const args[] =
00664 {
00665 &retval
00666 };
00667
00668 static size_t const nargs = 1;
00669
00670 POA_CORBA::Policy * const impl =
00671 static_cast<POA_CORBA::Policy *> (servant);
00672
00673 destroy_Policy command (
00674 impl);
00675
00676 TAO::Upcall_Wrapper upcall_wrapper;
00677 upcall_wrapper.upcall (server_request
00678 , args
00679 , nargs
00680 , command
00681 #if TAO_HAS_INTERCEPTORS == 1
00682 , servant_upcall
00683 , exceptions
00684 , nexceptions
00685 #endif
00686 ACE_ENV_ARG_PARAMETER);
00687 ACE_CHECK;
00688
00689 }
00690
00691
00692
00693
00694 namespace POA_CORBA
00695 {
00696
00697
00698
00699
00700
00701 class _is_a_Policy_Upcall_Command
00702 : public TAO::Upcall_Command
00703 {
00704 public:
00705 inline _is_a_Policy_Upcall_Command (
00706 POA_CORBA::Policy * servant,
00707 TAO_Operation_Details const * operation_details,
00708 TAO::Argument * const args[])
00709 : servant_ (servant)
00710 , operation_details_ (operation_details)
00711 , args_ (args)
00712 {
00713 }
00714
00715 virtual void execute (ACE_ENV_SINGLE_ARG_DECL)
00716 {
00717 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval =
00718 TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean> (
00719 this->operation_details_,
00720 this->args_);
00721
00722 TAO::SArg_Traits< CORBA::Char *>::in_arg_type arg_1 =
00723 TAO::Portable_Server::get_in_arg< CORBA::Char *> (
00724 this->operation_details_,
00725 this->args_,
00726 1);
00727
00728
00729 retval =
00730 this->servant_-> _is_a (
00731 arg_1
00732 ACE_ENV_ARG_PARAMETER);
00733
00734 }
00735
00736 private:
00737 POA_CORBA::Policy * const servant_;
00738 TAO_Operation_Details const * const operation_details_;
00739 TAO::Argument * const * const args_;
00740 };
00741
00742 }
00743 void POA_CORBA::Policy::_is_a_skel (
00744 TAO_ServerRequest & server_request,
00745 void * TAO_INTERCEPTOR (servant_upcall),
00746 void * servant
00747 ACE_ENV_ARG_DECL
00748 )
00749 {
00750
00751
00752 #if TAO_HAS_INTERCEPTORS == 1
00753 static CORBA::TypeCode_ptr const * const exceptions = 0;
00754 static CORBA::ULong const nexceptions = 0;
00755 #endif
00756
00757 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval;
00758 TAO::SArg_Traits< CORBA::Char *>::in_arg_val _tao_repository_id;
00759
00760 TAO::Argument * const args[] =
00761 {
00762 &retval,
00763 &_tao_repository_id
00764 };
00765
00766 static size_t const nargs = 2;
00767
00768 POA_CORBA::Policy * const impl =
00769 static_cast<POA_CORBA::Policy *> (servant);
00770
00771 _is_a_Policy_Upcall_Command command (
00772 impl,
00773 server_request.operation_details (),
00774 args);
00775
00776 TAO::Upcall_Wrapper upcall_wrapper;
00777 upcall_wrapper.upcall (server_request
00778 , args
00779 , nargs
00780 , command
00781 #if TAO_HAS_INTERCEPTORS == 1
00782 , servant_upcall
00783 , exceptions
00784 , nexceptions
00785 #endif
00786 ACE_ENV_ARG_PARAMETER);
00787 ACE_CHECK;
00788
00789 }
00790
00791 namespace POA_CORBA
00792 {
00793
00794
00795
00796
00797
00798 class _non_existent_Policy_Upcall_Command
00799 : public TAO::Upcall_Command
00800 {
00801 public:
00802 inline _non_existent_Policy_Upcall_Command (
00803 POA_CORBA::Policy * servant,
00804 TAO_Operation_Details const * operation_details,
00805 TAO::Argument * const args[])
00806 : servant_ (servant)
00807 , operation_details_ (operation_details)
00808 , args_ (args)
00809 {
00810 }
00811
00812 virtual void execute (ACE_ENV_SINGLE_ARG_DECL)
00813 {
00814 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval =
00815 TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean> (
00816 this->operation_details_,
00817 this->args_);
00818
00819
00820 retval =
00821 this->servant_-> _non_existent (
00822 ACE_ENV_SINGLE_ARG_PARAMETER);
00823
00824 }
00825
00826 private:
00827 POA_CORBA::Policy * const servant_;
00828 TAO_Operation_Details const * const operation_details_;
00829 TAO::Argument * const * const args_;
00830 };
00831
00832 }
00833 void POA_CORBA::Policy::_non_existent_skel (
00834 TAO_ServerRequest & server_request,
00835 void * TAO_INTERCEPTOR (servant_upcall),
00836 void * servant
00837 ACE_ENV_ARG_DECL
00838 )
00839 {
00840
00841
00842 #if TAO_HAS_INTERCEPTORS == 1
00843 static CORBA::TypeCode_ptr const * const exceptions = 0;
00844 static CORBA::ULong const nexceptions = 0;
00845 #endif
00846
00847 TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval;
00848
00849 TAO::Argument * const args[] =
00850 {
00851 &retval
00852 };
00853
00854 static size_t const nargs = 1;
00855
00856 POA_CORBA::Policy * const impl =
00857 static_cast<POA_CORBA::Policy *> (servant);
00858
00859 _non_existent_Policy_Upcall_Command command (
00860 impl,
00861 server_request.operation_details (),
00862 args);
00863
00864 TAO::Upcall_Wrapper upcall_wrapper;
00865 upcall_wrapper.upcall (server_request
00866 , args
00867 , nargs
00868 , command
00869 #if TAO_HAS_INTERCEPTORS == 1
00870 , servant_upcall
00871 , exceptions
00872 , nexceptions
00873 #endif
00874 ACE_ENV_ARG_PARAMETER);
00875 ACE_CHECK;
00876
00877 }
00878
00879
00880
00881
00882
00883
00884
00885
00886 void POA_CORBA::Policy::_interface_skel (
00887 TAO_ServerRequest & server_request,
00888 void * ,
00889 void * servant
00890 ACE_ENV_ARG_DECL
00891 )
00892 {
00893 TAO_IFR_Client_Adapter *_tao_adapter =
00894 ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
00895 TAO_ORB_Core::ifr_client_adapter_name ()
00896 );
00897
00898 if (_tao_adapter == 0)
00899 {
00900 ACE_THROW (CORBA::INTF_REPOS (CORBA::OMGVMCID | 1,
00901 CORBA::COMPLETED_NO));
00902 }
00903
00904 POA_CORBA::Policy * const impl =
00905 static_cast<POA_CORBA::Policy *> (servant);
00906 CORBA::InterfaceDef_ptr _tao_retval =
00907 impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER);
00908 ACE_CHECK;
00909
00910 server_request.init_reply ();
00911 TAO_OutputCDR &_tao_out = *server_request.outgoing ();
00912
00913 CORBA::Boolean const _tao_result =
00914 _tao_adapter->interfacedef_cdr_insert (
00915 _tao_out,
00916 _tao_retval
00917 );
00918
00919 _tao_adapter->dispose (_tao_retval);
00920
00921 if (_tao_result == 0)
00922 {
00923 ACE_THROW (CORBA::MARSHAL ());
00924 }
00925 }
00926
00927 namespace POA_CORBA
00928 {
00929
00930
00931
00932
00933
00934 class _get_component_Policy_Upcall_Command
00935 : public TAO::Upcall_Command
00936 {
00937 public:
00938 inline _get_component_Policy_Upcall_Command (
00939 POA_CORBA::Policy * servant,
00940 TAO_Operation_Details const * operation_details,
00941 TAO::Argument * const args[])
00942 : servant_ (servant)
00943 , operation_details_ (operation_details)
00944 , args_ (args)
00945 {
00946 }
00947
00948 virtual void execute (ACE_ENV_SINGLE_ARG_DECL)
00949 {
00950 TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval =
00951 TAO::Portable_Server::get_ret_arg< ::CORBA::Object> (
00952 this->operation_details_,
00953 this->args_);
00954
00955
00956 retval =
00957 this->servant_-> _get_component (
00958 ACE_ENV_SINGLE_ARG_PARAMETER);
00959
00960 }
00961
00962 private:
00963 POA_CORBA::Policy * const servant_;
00964 TAO_Operation_Details const * const operation_details_;
00965 TAO::Argument * const * const args_;
00966 };
00967
00968 }
00969 void POA_CORBA::Policy::_component_skel (
00970 TAO_ServerRequest & server_request,
00971 void * TAO_INTERCEPTOR (servant_upcall),
00972 void * servant
00973 ACE_ENV_ARG_DECL
00974 )
00975 {
00976
00977
00978 #if TAO_HAS_INTERCEPTORS == 1
00979 static CORBA::TypeCode_ptr const * const exceptions = 0;
00980 static CORBA::ULong const nexceptions = 0;
00981 #endif
00982
00983 TAO::SArg_Traits< ::CORBA::Object>::ret_val retval;
00984
00985 TAO::Argument * const args[] =
00986 {
00987 &retval
00988 };
00989
00990 static size_t const nargs = 1;
00991
00992 POA_CORBA::Policy * const impl =
00993 static_cast<POA_CORBA::Policy *> (servant);
00994
00995 _get_component_Policy_Upcall_Command command (
00996 impl,
00997 server_request.operation_details (),
00998 args);
00999
01000 TAO::Upcall_Wrapper upcall_wrapper;
01001 upcall_wrapper.upcall (server_request
01002 , args
01003 , nargs
01004 , command
01005 #if TAO_HAS_INTERCEPTORS == 1
01006 , servant_upcall
01007 , exceptions
01008 , nexceptions
01009 #endif
01010 ACE_ENV_ARG_PARAMETER);
01011 ACE_CHECK;
01012
01013 }
01014
01015 CORBA::Boolean POA_CORBA::Policy::_is_a (
01016 const char* value
01017 ACE_ENV_ARG_DECL_NOT_USED
01018 )
01019 {
01020 return
01021 (
01022 !ACE_OS::strcmp (
01023 value,
01024 "IDL:omg.org/CORBA/Policy:1.0"
01025 ) ||
01026 !ACE_OS::strcmp (
01027 value,
01028 "IDL:omg.org/CORBA/Object:1.0"
01029 )
01030 );
01031 }
01032
01033 const char* POA_CORBA::Policy::_interface_repository_id (void) const
01034 {
01035 return "IDL:omg.org/CORBA/Policy:1.0";
01036 }
01037
01038
01039
01040
01041 void POA_CORBA::Policy::_dispatch (
01042 TAO_ServerRequest & req,
01043 void * servant_upcall
01044 ACE_ENV_ARG_DECL
01045 )
01046 {
01047 this->synchronous_upcall_dispatch (req,
01048 servant_upcall,
01049 this
01050 ACE_ENV_ARG_PARAMETER);
01051 }
01052
01053
01054
01055
01056 CORBA::Policy *
01057 POA_CORBA::Policy::_this (ACE_ENV_SINGLE_ARG_DECL)
01058 {
01059 TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER);
01060 ACE_CHECK_RETURN (0);
01061
01062 TAO_Stub_Auto_Ptr safe_stub (stub);
01063 CORBA::Object_ptr tmp = CORBA::Object::_nil ();
01064
01065 CORBA::Boolean _tao_opt_colloc =
01066 stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ();
01067
01068 ACE_NEW_RETURN (
01069 tmp,
01070 CORBA::Object (stub, _tao_opt_colloc, this),
01071 0
01072 );
01073
01074 CORBA::Object_var obj = tmp;
01075 (void) safe_stub.release ();
01076
01077 typedef ::CORBA::Policy STUB_SCOPED_NAME;
01078 return
01079 TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow (
01080 obj.in (),
01081 CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer
01082 );
01083 }
01084
01085 #endif
01086
01087
01088 TAO_END_VERSIONED_NAMESPACE_DECL