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 #include "tao/PolicyC.h"
00033 #include "tao/CDR.h"
00034 #include "tao/Invocation_Adapter.h"
00035 #include "tao/Object_T.h"
00036 #include "tao/Basic_Arguments.h"
00037 #include "tao/Object_Argument_T.h"
00038 #include "ace/OS_NS_string.h"
00039 #include "tao/AnyTypeCode_Adapter.h"
00040 #include "ace/Dynamic_Service.h"
00041
00042 #if defined (__BORLANDC__)
00043 #pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
00044 #endif
00045
00046 #if !defined (__ACE_INLINE__)
00047 #include "tao/PolicyC.inl"
00048 #endif
00049
00050
00051
00052
00053 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00054
00055
00056 namespace CORBA
00057 {
00058 class Policy;
00059 typedef Policy *Policy_ptr;
00060 typedef TAO_Objref_Var_T<Policy> Policy_var;
00061 typedef TAO_Objref_Out_T<Policy> Policy_out;
00062 }
00063
00064 namespace TAO
00065 {
00066
00067 #if TAO_HAS_INTERCEPTORS == 1
00068
00069 #endif
00070
00071 }
00072
00073
00074 namespace TAO
00075 {
00076
00077 #if !defined (_CORBA_POLICY__ARG_TRAITS_CS_)
00078 #define _CORBA_POLICY__ARG_TRAITS_CS_
00079
00080 template<>
00081 class Arg_Traits<CORBA::Policy>
00082 : public
00083 Object_Arg_Traits_T<
00084 CORBA::Policy_ptr,
00085 CORBA::Policy_var,
00086 CORBA::Policy_out,
00087 TAO::Objref_Traits<CORBA::Policy>,
00088 TAO::Any_Insert_Policy_AnyTypeCode_Adapter <CORBA::Policy_ptr>
00089 >
00090 {
00091 };
00092
00093 #endif
00094 }
00095
00096
00097
00098
00099
00100 CORBA::PolicyError::PolicyError (void)
00101 : CORBA::UserException (
00102 "IDL:omg.org/CORBA/PolicyError:1.0",
00103 "PolicyError"
00104 )
00105 {
00106 }
00107
00108 CORBA::PolicyError::~PolicyError (void)
00109 {
00110 }
00111
00112 CORBA::PolicyError::PolicyError (const ::CORBA::PolicyError &_tao_excp)
00113 : CORBA::UserException (
00114 _tao_excp._rep_id (),
00115 _tao_excp._name ()
00116 )
00117 {
00118 this->reason = _tao_excp.reason;
00119 }
00120
00121 CORBA::PolicyError&
00122 CORBA::PolicyError::operator= (const ::CORBA::PolicyError &_tao_excp)
00123 {
00124 this->::CORBA::UserException::operator= (_tao_excp);
00125 this->reason = _tao_excp.reason;
00126 return *this;
00127 }
00128
00129 void CORBA::PolicyError::_tao_any_destructor (void *_tao_void_pointer)
00130 {
00131 PolicyError *_tao_tmp_pointer =
00132 static_cast<PolicyError *> (_tao_void_pointer);
00133 delete _tao_tmp_pointer;
00134 }
00135
00136 CORBA::PolicyError *
00137 CORBA::PolicyError::_downcast (CORBA::Exception *_tao_excp)
00138 {
00139 return dynamic_cast<PolicyError *> (_tao_excp);
00140 }
00141
00142 const CORBA::PolicyError *
00143 CORBA::PolicyError::_downcast (CORBA::Exception const *_tao_excp)
00144 {
00145 return dynamic_cast<const PolicyError *> (_tao_excp);
00146 }
00147
00148 CORBA::Exception *CORBA::PolicyError::_alloc (void)
00149 {
00150 CORBA::Exception *retval = 0;
00151 ACE_NEW_RETURN (retval, ::CORBA::PolicyError, 0);
00152 return retval;
00153 }
00154
00155 CORBA::Exception *
00156 CORBA::PolicyError::_tao_duplicate (void) const
00157 {
00158 CORBA::Exception *result = 0;
00159 ACE_NEW_RETURN (
00160 result,
00161 ::CORBA::PolicyError (*this),
00162 0
00163 );
00164 return result;
00165 }
00166
00167 void CORBA::PolicyError::_raise (void) const
00168 {
00169 TAO_RAISE (*this);
00170 }
00171
00172 void CORBA::PolicyError::_tao_encode (
00173 TAO_OutputCDR &cdr
00174 ACE_ENV_ARG_DECL
00175 ) const
00176 {
00177 if (cdr << *this)
00178 {
00179 return;
00180 }
00181
00182 ACE_THROW (CORBA::MARSHAL ());
00183 }
00184
00185 void CORBA::PolicyError::_tao_decode (
00186 TAO_InputCDR &cdr
00187 ACE_ENV_ARG_DECL
00188 )
00189 {
00190 if (cdr >> *this)
00191 {
00192 return;
00193 }
00194
00195 ACE_THROW (CORBA::MARSHAL ());
00196 }
00197
00198
00199
00200
00201
00202
00203 CORBA::PolicyError::PolicyError (
00204 CORBA::PolicyErrorCode _tao_reason
00205 )
00206 : CORBA::UserException (
00207 "IDL:omg.org/CORBA/PolicyError:1.0",
00208 "PolicyError"
00209 )
00210 {
00211 this->reason = _tao_reason;
00212 }
00213
00214
00215 CORBA::TypeCode_ptr CORBA::PolicyError::_tao_type (void) const
00216 {
00217 TAO_AnyTypeCode_Adapter *adapter =
00218 ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance (
00219 "AnyTypeCode_Adapter"
00220 );
00221 if (adapter != 0)
00222 return adapter->_tao_type_PolicyError ();
00223 else
00224 {
00225 ACE_ERROR ((LM_ERROR,
00226 ACE_TEXT ("(%P|%t) %p\n"),
00227 ACE_TEXT ("Unable to find the ")
00228 ACE_TEXT ("AnyTypeCode Adapter instance")));
00229 return 0;
00230 }
00231 }
00232
00233
00234
00235
00236 CORBA::InvalidPolicies::InvalidPolicies (void)
00237 : CORBA::UserException (
00238 "IDL:omg.org/CORBA/InvalidPolicies:1.0",
00239 "InvalidPolicies"
00240 )
00241 {
00242 }
00243
00244 CORBA::InvalidPolicies::~InvalidPolicies (void)
00245 {
00246 }
00247
00248 CORBA::InvalidPolicies::InvalidPolicies (const ::CORBA::InvalidPolicies &_tao_excp)
00249 : CORBA::UserException (
00250 _tao_excp._rep_id (),
00251 _tao_excp._name ()
00252 )
00253 {
00254 this->indices = _tao_excp.indices;
00255 }
00256
00257 CORBA::InvalidPolicies&
00258 CORBA::InvalidPolicies::operator= (const ::CORBA::InvalidPolicies &_tao_excp)
00259 {
00260 this->::CORBA::UserException::operator= (_tao_excp);
00261 this->indices = _tao_excp.indices;
00262 return *this;
00263 }
00264
00265 void CORBA::InvalidPolicies::_tao_any_destructor (void *_tao_void_pointer)
00266 {
00267 InvalidPolicies *_tao_tmp_pointer =
00268 static_cast<InvalidPolicies *> (_tao_void_pointer);
00269 delete _tao_tmp_pointer;
00270 }
00271
00272 CORBA::InvalidPolicies *
00273 CORBA::InvalidPolicies::_downcast (CORBA::Exception *_tao_excp)
00274 {
00275 return dynamic_cast<InvalidPolicies *> (_tao_excp);
00276 }
00277
00278 const CORBA::InvalidPolicies *
00279 CORBA::InvalidPolicies::_downcast (CORBA::Exception const *_tao_excp)
00280 {
00281 return dynamic_cast<const InvalidPolicies *> (_tao_excp);
00282 }
00283
00284 CORBA::Exception *CORBA::InvalidPolicies::_alloc (void)
00285 {
00286 CORBA::Exception *retval = 0;
00287 ACE_NEW_RETURN (retval, ::CORBA::InvalidPolicies, 0);
00288 return retval;
00289 }
00290
00291 CORBA::Exception *
00292 CORBA::InvalidPolicies::_tao_duplicate (void) const
00293 {
00294 CORBA::Exception *result = 0;
00295 ACE_NEW_RETURN (
00296 result,
00297 ::CORBA::InvalidPolicies (*this),
00298 0
00299 );
00300 return result;
00301 }
00302
00303 void CORBA::InvalidPolicies::_raise (void) const
00304 {
00305 TAO_RAISE (*this);
00306 }
00307
00308 void CORBA::InvalidPolicies::_tao_encode (
00309 TAO_OutputCDR &cdr
00310 ACE_ENV_ARG_DECL
00311 ) const
00312 {
00313 if (cdr << *this)
00314 {
00315 return;
00316 }
00317
00318 ACE_THROW (CORBA::MARSHAL ());
00319 }
00320
00321 void CORBA::InvalidPolicies::_tao_decode (
00322 TAO_InputCDR &cdr
00323 ACE_ENV_ARG_DECL
00324 )
00325 {
00326 if (cdr >> *this)
00327 {
00328 return;
00329 }
00330
00331 ACE_THROW (CORBA::MARSHAL ());
00332 }
00333
00334
00335
00336
00337
00338
00339 CORBA::InvalidPolicies::InvalidPolicies (
00340 const CORBA::UShortSeq & _tao_indices
00341 )
00342 : CORBA::UserException (
00343 "IDL:omg.org/CORBA/InvalidPolicies:1.0",
00344 "InvalidPolicies"
00345 )
00346 {
00347 this->indices = _tao_indices;
00348 }
00349
00350
00351 CORBA::TypeCode_ptr CORBA::InvalidPolicies::_tao_type (void) const
00352 {
00353 TAO_AnyTypeCode_Adapter *adapter =
00354 ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance (
00355 "AnyTypeCode_Adapter"
00356 );
00357 if (adapter != 0)
00358 return adapter->_tao_type_InvalidPolicies ();
00359 else
00360 {
00361 ACE_ERROR ((LM_ERROR,
00362 ACE_TEXT ("(%P|%t) %p\n"),
00363 ACE_TEXT ("Unable to find the ")
00364 ACE_TEXT ("AnyTypeCode Adapter instance")));
00365 return 0;
00366 }
00367 }
00368
00369
00370
00371
00372
00373
00374 CORBA::Policy_ptr
00375 TAO::Objref_Traits<CORBA::Policy>::duplicate (
00376 CORBA::Policy_ptr p
00377 )
00378 {
00379 return CORBA::Policy::_duplicate (p);
00380 }
00381
00382 void
00383 TAO::Objref_Traits<CORBA::Policy>::release (
00384 CORBA::Policy_ptr p
00385 )
00386 {
00387 ::CORBA::release (p);
00388 }
00389
00390 CORBA::Policy_ptr
00391 TAO::Objref_Traits<CORBA::Policy>::nil (void)
00392 {
00393 return CORBA::Policy::_nil ();
00394 }
00395
00396 CORBA::Boolean
00397 TAO::Objref_Traits<CORBA::Policy>::marshal (
00398 const CORBA::Policy_ptr p,
00399 TAO_OutputCDR & cdr
00400 )
00401 {
00402 return CORBA::Object::marshal (p, cdr);
00403 }
00404
00405
00406 TAO::Collocation_Proxy_Broker *
00407 (*CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer) (
00408 CORBA::Object_ptr obj
00409 ) = 0;
00410
00411
00412
00413
00414 CORBA::PolicyType CORBA::Policy::policy_type (
00415 ACE_ENV_SINGLE_ARG_DECL
00416 )
00417 ACE_THROW_SPEC ((
00418 CORBA::SystemException
00419 ))
00420 {
00421 if (!this->is_evaluated ())
00422 {
00423 ::CORBA::Object::tao_object_initialize (this);
00424 }
00425
00426 if (this->the_TAO_Policy_Proxy_Broker_ == 0)
00427 {
00428 CORBA_Policy_setup_collocation ();
00429 }
00430
00431 TAO::Arg_Traits< ::CORBA::PolicyType>::ret_val _tao_retval;
00432
00433 TAO::Argument *_the_tao_operation_signature [] =
00434 {
00435 &_tao_retval
00436 };
00437
00438 TAO::Invocation_Adapter _tao_call (
00439 this,
00440 _the_tao_operation_signature,
00441 1,
00442 "_get_policy_type",
00443 16,
00444 this->the_TAO_Policy_Proxy_Broker_
00445 );
00446
00447 _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
00448 ACE_CHECK_RETURN (_tao_retval.excp ());
00449
00450 return _tao_retval.retn ();
00451 }
00452
00453
00454
00455
00456 ::CORBA::Policy_ptr CORBA::Policy::copy (
00457 ACE_ENV_SINGLE_ARG_DECL
00458 )
00459 ACE_THROW_SPEC ((
00460 CORBA::SystemException
00461 ))
00462 {
00463 if (!this->is_evaluated ())
00464 {
00465 ::CORBA::Object::tao_object_initialize (this);
00466 }
00467
00468 if (this->the_TAO_Policy_Proxy_Broker_ == 0)
00469 {
00470 CORBA_Policy_setup_collocation ();
00471 }
00472
00473 TAO::Arg_Traits< ::CORBA::Policy>::ret_val _tao_retval;
00474
00475 TAO::Argument *_the_tao_operation_signature [] =
00476 {
00477 &_tao_retval
00478 };
00479
00480 TAO::Invocation_Adapter _tao_call (
00481 this,
00482 _the_tao_operation_signature,
00483 1,
00484 "copy",
00485 4,
00486 this->the_TAO_Policy_Proxy_Broker_
00487 );
00488
00489 _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
00490 ACE_CHECK_RETURN (_tao_retval.excp ());
00491
00492 return _tao_retval.retn ();
00493 }
00494
00495
00496
00497
00498 void CORBA::Policy::destroy (
00499 ACE_ENV_SINGLE_ARG_DECL
00500 )
00501 ACE_THROW_SPEC ((
00502 CORBA::SystemException
00503 ))
00504 {
00505 if (!this->is_evaluated ())
00506 {
00507 ::CORBA::Object::tao_object_initialize (this);
00508 }
00509
00510 if (this->the_TAO_Policy_Proxy_Broker_ == 0)
00511 {
00512 CORBA_Policy_setup_collocation ();
00513 }
00514
00515 TAO::Arg_Traits< void>::ret_val _tao_retval;
00516
00517 TAO::Argument *_the_tao_operation_signature [] =
00518 {
00519 &_tao_retval
00520 };
00521
00522 TAO::Invocation_Adapter _tao_call (
00523 this,
00524 _the_tao_operation_signature,
00525 1,
00526 "destroy",
00527 7,
00528 this->the_TAO_Policy_Proxy_Broker_
00529 );
00530
00531 _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
00532 ACE_CHECK;
00533 }
00534
00535 CORBA::Policy::Policy (void)
00536 : the_TAO_Policy_Proxy_Broker_ (0)
00537 {
00538 this->CORBA_Policy_setup_collocation ();
00539 }
00540
00541 void
00542 CORBA::Policy::CORBA_Policy_setup_collocation ()
00543 {
00544 if (::CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer)
00545 {
00546 this->the_TAO_Policy_Proxy_Broker_ =
00547 ::CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer (this);
00548 }
00549 }
00550
00551 CORBA::Policy::~Policy (void)
00552 {}
00553
00554 void
00555 CORBA::Policy::_tao_any_destructor (void *_tao_void_pointer)
00556 {
00557 Policy *_tao_tmp_pointer =
00558 static_cast<Policy *> (_tao_void_pointer);
00559 ::CORBA::release (_tao_tmp_pointer);
00560 }
00561
00562 CORBA::Policy_ptr
00563 CORBA::Policy::_narrow (
00564 CORBA::Object_ptr _tao_objref
00565 ACE_ENV_ARG_DECL
00566 )
00567 {
00568 return
00569 TAO::Narrow_Utils<Policy>::narrow (
00570 _tao_objref,
00571 "IDL:omg.org/CORBA/Policy:1.0",
00572 CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer
00573 ACE_ENV_ARG_PARAMETER
00574 );
00575 }
00576
00577 CORBA::Policy_ptr
00578 CORBA::Policy::_unchecked_narrow (
00579 CORBA::Object_ptr _tao_objref
00580 ACE_ENV_ARG_DECL
00581 )
00582 {
00583 return
00584 TAO::Narrow_Utils<Policy>::unchecked_narrow (
00585 _tao_objref,
00586 "IDL:omg.org/CORBA/Policy:1.0",
00587 CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer
00588 ACE_ENV_ARG_PARAMETER
00589 );
00590 }
00591
00592 CORBA::Policy_ptr
00593 CORBA::Policy::_duplicate (Policy_ptr obj)
00594 {
00595 if (! ::CORBA::is_nil (obj))
00596 {
00597 obj->_add_ref ();
00598 }
00599
00600 return obj;
00601 }
00602
00603 void
00604 CORBA::Policy::_tao_release (Policy_ptr obj)
00605 {
00606 ::CORBA::release (obj);
00607 }
00608
00609 CORBA::Boolean
00610 CORBA::Policy::_is_a (
00611 const char *value
00612 ACE_ENV_ARG_DECL
00613 )
00614 {
00615 if (
00616 !ACE_OS::strcmp (
00617 value,
00618 "IDL:omg.org/CORBA/Policy:1.0"
00619 ) ||
00620 !ACE_OS::strcmp (
00621 value,
00622 "IDL:omg.org/CORBA/Object:1.0"
00623 )
00624 )
00625 {
00626 return true;
00627 }
00628 else
00629 {
00630 return this->::CORBA::Object::_is_a (
00631 value
00632 ACE_ENV_ARG_PARAMETER
00633 );
00634 }
00635 }
00636
00637 const char* CORBA::Policy::_interface_repository_id (void) const
00638 {
00639 return "IDL:omg.org/CORBA/Policy:1.0";
00640 }
00641
00642 CORBA::Boolean
00643 CORBA::Policy::marshal (TAO_OutputCDR &cdr)
00644 {
00645 return (cdr << this);
00646 }
00647
00648
00649
00650
00651
00652
00653 CORBA::PolicyManager_ptr
00654 TAO::Objref_Traits<CORBA::PolicyManager>::duplicate (
00655 CORBA::PolicyManager_ptr p
00656 )
00657 {
00658 return CORBA::PolicyManager::_duplicate (p);
00659 }
00660
00661 void
00662 TAO::Objref_Traits<CORBA::PolicyManager>::release (
00663 CORBA::PolicyManager_ptr p
00664 )
00665 {
00666 ::CORBA::release (p);
00667 }
00668
00669 CORBA::PolicyManager_ptr
00670 TAO::Objref_Traits<CORBA::PolicyManager>::nil (void)
00671 {
00672 return CORBA::PolicyManager::_nil ();
00673 }
00674
00675 CORBA::Boolean
00676 TAO::Objref_Traits<CORBA::PolicyManager>::marshal (
00677 const CORBA::PolicyManager_ptr p,
00678 TAO_OutputCDR & cdr
00679 )
00680 {
00681 return CORBA::Object::marshal (p, cdr);
00682 }
00683
00684 CORBA::PolicyManager::PolicyManager (void)
00685 {}
00686
00687 CORBA::PolicyManager::~PolicyManager (void)
00688 {}
00689
00690 void
00691 CORBA::PolicyManager::_tao_any_destructor (void *_tao_void_pointer)
00692 {
00693 PolicyManager *_tao_tmp_pointer =
00694 static_cast<PolicyManager *> (_tao_void_pointer);
00695 ::CORBA::release (_tao_tmp_pointer);
00696 }
00697
00698 CORBA::PolicyManager_ptr
00699 CORBA::PolicyManager::_narrow (
00700 CORBA::Object_ptr _tao_objref
00701 ACE_ENV_ARG_DECL_NOT_USED
00702 )
00703 {
00704 return PolicyManager::_duplicate (
00705 dynamic_cast<PolicyManager_ptr> (_tao_objref)
00706 );
00707 }
00708
00709 CORBA::PolicyManager_ptr
00710 CORBA::PolicyManager::_unchecked_narrow (
00711 CORBA::Object_ptr _tao_objref
00712 ACE_ENV_ARG_DECL_NOT_USED
00713 )
00714 {
00715 return PolicyManager::_duplicate (
00716 dynamic_cast<PolicyManager_ptr> (_tao_objref)
00717 );
00718 }
00719
00720 CORBA::PolicyManager_ptr
00721 CORBA::PolicyManager::_duplicate (PolicyManager_ptr obj)
00722 {
00723 if (! ::CORBA::is_nil (obj))
00724 {
00725 obj->_add_ref ();
00726 }
00727
00728 return obj;
00729 }
00730
00731 void
00732 CORBA::PolicyManager::_tao_release (PolicyManager_ptr obj)
00733 {
00734 ::CORBA::release (obj);
00735 }
00736
00737 CORBA::Boolean
00738 CORBA::PolicyManager::_is_a (
00739 const char *value
00740 ACE_ENV_ARG_DECL_NOT_USED
00741 )
00742 {
00743 if (
00744 !ACE_OS::strcmp (
00745 value,
00746 "IDL:omg.org/CORBA/PolicyManager:1.0"
00747 ) ||
00748 !ACE_OS::strcmp (
00749 value,
00750 "IDL:omg.org/CORBA/LocalObject:1.0"
00751 ) ||
00752 !ACE_OS::strcmp (
00753 value,
00754 "IDL:omg.org/CORBA/Object:1.0"
00755 )
00756 )
00757 {
00758 return true;
00759 }
00760 else
00761 {
00762 return false;
00763 }
00764 }
00765
00766 const char* CORBA::PolicyManager::_interface_repository_id (void) const
00767 {
00768 return "IDL:omg.org/CORBA/PolicyManager:1.0";
00769 }
00770
00771 CORBA::Boolean
00772 CORBA::PolicyManager::marshal (TAO_OutputCDR &)
00773 {
00774 return false;
00775 }
00776
00777
00778
00779
00780
00781
00782 CORBA::PolicyCurrent_ptr
00783 TAO::Objref_Traits<CORBA::PolicyCurrent>::duplicate (
00784 CORBA::PolicyCurrent_ptr p
00785 )
00786 {
00787 return CORBA::PolicyCurrent::_duplicate (p);
00788 }
00789
00790 void
00791 TAO::Objref_Traits<CORBA::PolicyCurrent>::release (
00792 CORBA::PolicyCurrent_ptr p
00793 )
00794 {
00795 ::CORBA::release (p);
00796 }
00797
00798 CORBA::PolicyCurrent_ptr
00799 TAO::Objref_Traits<CORBA::PolicyCurrent>::nil (void)
00800 {
00801 return CORBA::PolicyCurrent::_nil ();
00802 }
00803
00804 CORBA::Boolean
00805 TAO::Objref_Traits<CORBA::PolicyCurrent>::marshal (
00806 const CORBA::PolicyCurrent_ptr p,
00807 TAO_OutputCDR & cdr
00808 )
00809 {
00810 return CORBA::Object::marshal (p, cdr);
00811 }
00812
00813 CORBA::PolicyCurrent::PolicyCurrent (void)
00814 {}
00815
00816 CORBA::PolicyCurrent::~PolicyCurrent (void)
00817 {}
00818
00819 void
00820 CORBA::PolicyCurrent::_tao_any_destructor (void *_tao_void_pointer)
00821 {
00822 PolicyCurrent *_tao_tmp_pointer =
00823 static_cast<PolicyCurrent *> (_tao_void_pointer);
00824 ::CORBA::release (_tao_tmp_pointer);
00825 }
00826
00827 CORBA::PolicyCurrent_ptr
00828 CORBA::PolicyCurrent::_narrow (
00829 CORBA::Object_ptr _tao_objref
00830 ACE_ENV_ARG_DECL_NOT_USED
00831 )
00832 {
00833 return PolicyCurrent::_duplicate (
00834 dynamic_cast<PolicyCurrent_ptr> (_tao_objref)
00835 );
00836 }
00837
00838 CORBA::PolicyCurrent_ptr
00839 CORBA::PolicyCurrent::_unchecked_narrow (
00840 CORBA::Object_ptr _tao_objref
00841 ACE_ENV_ARG_DECL_NOT_USED
00842 )
00843 {
00844 return PolicyCurrent::_duplicate (
00845 dynamic_cast<PolicyCurrent_ptr> (_tao_objref)
00846 );
00847 }
00848
00849 CORBA::PolicyCurrent_ptr
00850 CORBA::PolicyCurrent::_duplicate (PolicyCurrent_ptr obj)
00851 {
00852 if (! ::CORBA::is_nil (obj))
00853 {
00854 obj->_add_ref ();
00855 }
00856
00857 return obj;
00858 }
00859
00860 void
00861 CORBA::PolicyCurrent::_tao_release (PolicyCurrent_ptr obj)
00862 {
00863 ::CORBA::release (obj);
00864 }
00865
00866 CORBA::Boolean
00867 CORBA::PolicyCurrent::_is_a (
00868 const char *value
00869 ACE_ENV_ARG_DECL_NOT_USED
00870 )
00871 {
00872 if (
00873 !ACE_OS::strcmp (
00874 value,
00875 "IDL:omg.org/CORBA/PolicyManager:1.0"
00876 ) ||
00877 !ACE_OS::strcmp (
00878 value,
00879 "IDL:omg.org/CORBA/Current:1.0"
00880 ) ||
00881 !ACE_OS::strcmp (
00882 value,
00883 "IDL:omg.org/CORBA/PolicyCurrent:1.0"
00884 ) ||
00885 !ACE_OS::strcmp (
00886 value,
00887 "IDL:omg.org/CORBA/LocalObject:1.0"
00888 ) ||
00889 !ACE_OS::strcmp (
00890 value,
00891 "IDL:omg.org/CORBA/Object:1.0"
00892 )
00893 )
00894 {
00895 return true;
00896 }
00897 else
00898 {
00899 return false;
00900 }
00901 }
00902
00903 const char* CORBA::PolicyCurrent::_interface_repository_id (void) const
00904 {
00905 return "IDL:omg.org/CORBA/PolicyCurrent:1.0";
00906 }
00907
00908 CORBA::Boolean
00909 CORBA::PolicyCurrent::marshal (TAO_OutputCDR &)
00910 {
00911 return false;
00912 }
00913
00914
00915
00916
00917 CORBA::Boolean operator<< (
00918 TAO_OutputCDR &strm,
00919 const CORBA::PolicyError &_tao_aggregate
00920 )
00921 {
00922
00923 if (strm << _tao_aggregate._rep_id ())
00924 {
00925
00926 return (
00927 (strm << _tao_aggregate.reason)
00928 );
00929 }
00930 else
00931 {
00932 return false;
00933 }
00934 }
00935
00936 CORBA::Boolean operator>> (
00937 TAO_InputCDR &strm,
00938 CORBA::PolicyError &_tao_aggregate
00939 )
00940 {
00941
00942 return (
00943 (strm >> _tao_aggregate.reason)
00944 );
00945 }
00946
00947
00948
00949
00950 CORBA::Boolean operator<< (
00951 TAO_OutputCDR &strm,
00952 const CORBA::InvalidPolicies &_tao_aggregate
00953 )
00954 {
00955
00956 if (strm << _tao_aggregate._rep_id ())
00957 {
00958
00959 return (
00960 (strm << _tao_aggregate.indices)
00961 );
00962 }
00963 else
00964 {
00965 return false;
00966 }
00967 }
00968
00969 CORBA::Boolean operator>> (
00970 TAO_InputCDR &strm,
00971 CORBA::InvalidPolicies &_tao_aggregate
00972 )
00973 {
00974
00975 return (
00976 (strm >> _tao_aggregate.indices)
00977 );
00978 }
00979
00980
00981
00982
00983 CORBA::Boolean
00984 CORBA::Policy::_tao_encode (TAO_OutputCDR &)
00985 {
00986 return false;
00987 }
00988
00989 CORBA::Boolean
00990 CORBA::Policy::_tao_decode (TAO_InputCDR &)
00991 {
00992 return false;
00993 }
00994
00995 TAO_Cached_Policy_Type
00996 CORBA::Policy::_tao_cached_type (void) const
00997 {
00998 return TAO_CACHED_POLICY_UNCACHED;
00999 }
01000
01001 TAO_Policy_Scope
01002 CORBA::Policy::_tao_scope (void) const
01003 {
01004 return TAO_POLICY_DEFAULT_SCOPE;
01005 }
01006
01007
01008
01009
01010
01011 CORBA::Boolean operator<< (
01012 TAO_OutputCDR &strm,
01013 const CORBA::Policy_ptr _tao_objref
01014 )
01015 {
01016 CORBA::Object_ptr _tao_corba_obj = _tao_objref;
01017 return (strm << _tao_corba_obj);
01018 }
01019
01020 CORBA::Boolean operator>> (
01021 TAO_InputCDR &strm,
01022 CORBA::Policy_ptr &_tao_objref
01023 )
01024 {
01025 CORBA::Object_var obj;
01026
01027 if (!(strm >> obj.inout ()))
01028 {
01029 return false;
01030 }
01031
01032 typedef ::CORBA::Policy RHS_SCOPED_NAME;
01033
01034
01035 _tao_objref =
01036 TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
01037 obj.in (),
01038 CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer
01039 );
01040
01041 return 1;
01042 }
01043
01044 TAO_END_VERSIONED_NAMESPACE_DECL