diff options
Diffstat (limited to 'TAO/tao/POAC.cpp')
-rw-r--r-- | TAO/tao/POAC.cpp | 154 |
1 files changed, 0 insertions, 154 deletions
diff --git a/TAO/tao/POAC.cpp b/TAO/tao/POAC.cpp index e238c9fde54..ecfd1638379 100644 --- a/TAO/tao/POAC.cpp +++ b/TAO/tao/POAC.cpp @@ -8,8 +8,6 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html #include "tao/corba.h" -#include "POAC.h" -#include "POAS.h" #if !defined (__ACE_INLINE__) #include "POAC.i" @@ -105,158 +103,6 @@ static const CORBA::Long _oc_PortableServer_CurrentBase[] = static CORBA::TypeCode _tc__tc_PortableServer_CurrentBase (CORBA::tk_objref, sizeof (_oc_PortableServer_CurrentBase), (char *) &_oc_PortableServer_CurrentBase, CORBA::B_FALSE); CORBA::TypeCode_ptr PortableServer::_tc_CurrentBase = &_tc__tc_PortableServer_CurrentBase; -PortableServer::Policy_ptr PortableServer::Policy::_duplicate (PortableServer::Policy_ptr obj) -{ - if (!CORBA::is_nil (obj)) - obj->AddRef (); - - return obj; -} // end of _duplicate - -PortableServer::Policy_ptr PortableServer::Policy::_narrow ( - CORBA::Object_ptr obj, - CORBA::Environment &env - ) -{ - if (CORBA::is_nil (obj)) - return PortableServer::Policy::_nil (); - if (!obj->_is_a ("IDL:PortableServer/Policy:1.0", env)) - return PortableServer::Policy::_nil (); - if (!obj->_is_collocated () || !obj->_servant()) - { - PortableServer::Policy_ptr new_obj = new PortableServer::Policy (obj->_get_parent ()); // construct obj ref using the stub object - return new_obj; - } // end of if - - STUB_Object *stub = obj->_servant ()->_create_stub (env); - if (env.exception () != 0) - return PortableServer::Policy::_nil (); - void* servant = obj->_servant ()->_downcast ("IDL:PortableServer/Policy:1.0"); - return new POA_PortableServer::_tao_collocated_Policy( - ACE_reinterpret_cast(POA_PortableServer::Policy_ptr, servant), - stub - ); -} - -PortableServer::Policy_ptr PortableServer::Policy::_bind (const char *host, CORBA::UShort port, const char *key, CORBA::Environment &env) -{ - IIOP_Object *data = new IIOP_Object (host, port, key); - // create the CORBA level proxy - CORBA::Object_ptr objref = new CORBA_Object (data); - if (objref == 0) - { - data->Release (); - env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); - return PortableServer::Policy::_nil (); - } - return PortableServer::Policy::_narrow (objref, env); -} - -static const TAO_Param_Data PortableServer_Policy_copy_paramdata [] = -{ - {PortableServer::_tc_Policy, PARAM_RETURN, 0} -}; - -static const TAO_Call_Data PortableServer_Policy_copy_calldata = -{"copy", 1, 1, PortableServer_Policy_copy_paramdata, 0, 0}; - -PortableServer::Policy_ptr PortableServer::Policy::copy (CORBA::Environment &env) -{ - CORBA::Object_ptr retval = CORBA::Object::_nil (); - STUB_Object *istub; - - if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) - { - env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); - return PortableServer::Policy::_nil (); - } - this->Release (); // QueryInterface has bumped up our refcount - istub->do_static_call (env, &PortableServer_Policy_copy_calldata, &retval); - return PortableServer::Policy::_narrow (retval, env); - -} - -static const TAO_Param_Data PortableServer_Policy_destroy_paramdata [] = -{ - {CORBA::_tc_void, PARAM_RETURN, 0} -}; - -static const TAO_Call_Data PortableServer_Policy_destroy_calldata = -{"destroy", 1, 1, PortableServer_Policy_destroy_paramdata, 0, 0}; - -void PortableServer::Policy::destroy (CORBA::Environment &env) -{ - STUB_Object *istub; - - if (this->QueryInterface (IID_STUB_Object, (void **)&istub) != TAO_NOERROR) - { - env.exception (new CORBA::DATA_CONVERSION (CORBA::COMPLETED_NO)); - return; - } - this->Release (); // QueryInterface has bumped up our refcount - istub->do_static_call (env, &PortableServer_Policy_destroy_calldata, 0); - return; // no value - -} - -CORBA::Boolean PortableServer::Policy::_is_a (const CORBA::Char *value, CORBA::Environment &_tao_environment) -{ - if ( - (!ACE_OS::strcmp ((char *)value, "IDL:PortableServer/Policy:1.0")) || - (!ACE_OS::strcmp ((char *)value, CORBA::_tc_Object->id (_tao_environment)))) - return 1; // success using local knowledge - else - return this->CORBA_Object::_is_a (value, _tao_environment); // remote call -} - -static const CORBA::Long _oc_PortableServer_Policy[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 30, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/Policy:1.0 - 7, 0x506f6c69, 0x63790000, // name = Policy, -}; -static CORBA::TypeCode _tc__tc_PortableServer_Policy (CORBA::tk_objref, sizeof (_oc_PortableServer_Policy), (char *) &_oc_PortableServer_Policy, CORBA::B_FALSE); -CORBA::TypeCode_ptr PortableServer::_tc_Policy = &_tc__tc_PortableServer_Policy; - - -#if !defined (_PORTABLESERVER__TAO_SEQ_POLICY_CS_) -#define _PORTABLESERVER__TAO_SEQ_POLICY_CS_ - -static const CORBA::Long _oc_PortableServer__tao_seq_Policy[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_objref, // typecode kind - 60, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 30, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/Policy:1.0 - 7, 0x506f6c69, 0x63790000, // name = Policy, - 0, -}; -static CORBA::TypeCode _tc__tc_PortableServer__tao_seq_Policy (CORBA::tk_sequence, sizeof (_oc_PortableServer__tao_seq_Policy), (char *) &_oc_PortableServer__tao_seq_Policy, CORBA::B_FALSE); -CORBA::TypeCode_ptr PortableServer::_tc__tao_seq_Policy = &_tc__tc_PortableServer__tao_seq_Policy; - - -#endif // end #if !defined - -static const CORBA::Long _oc_PortableServer_PolicyList[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 34, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x794c6973, 0x743a312e, 0x30000000, // repository ID = IDL:PortableServer/PolicyList:1.0 - 11, 0x506f6c69, 0x63794c69, 0x73740000, // name = PolicyList - CORBA::tk_sequence, // typecode kind - 68, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_objref, // typecode kind - 60, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 30, 0x49444c3a, 0x506f7274, 0x61626c65, 0x53657276, 0x65722f50, 0x6f6c6963, 0x793a312e, 0x30000000, // repository ID = IDL:PortableServer/Policy:1.0 - 7, 0x506f6c69, 0x63790000, // name = Policy, - 0, -}; -static CORBA::TypeCode _tc__tc_PortableServer_PolicyList (CORBA::tk_alias, sizeof (_oc_PortableServer_PolicyList), (char *) &_oc_PortableServer_PolicyList, CORBA::B_FALSE); -CORBA::TypeCode_ptr PortableServer::_tc_PolicyList = &_tc__tc_PortableServer_PolicyList; - - #if !defined (_PORTABLESERVER__TAO_SEQ_OCTET_CS_) #define _PORTABLESERVER__TAO_SEQ_OCTET_CS_ |