⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 poastubs.cc

📁 编译工具
💻 CC
📖 第 1 页 / 共 3 页
字号:
// -*- Mode: C++; -*-//                            Package   : omniORB// poastubs.cc                Created on: 19/7/99//                            Author    : David Riddoch (djr)////    Copyright (C) 1996-1999 AT&T Research Cambridge////    This file is part of the omniORB library////    The omniORB library is free software; you can redistribute it and/or//    modify it under the terms of the GNU Library General Public//    License as published by the Free Software Foundation; either//    version 2 of the License, or (at your option) any later version.////    This library is distributed in the hope that it will be useful,//    but WITHOUT ANY WARRANTY; without even the implied warranty of//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU//    Library General Public License for more details.////    You should have received a copy of the GNU Library General Public//    License along with this library; if not, write to the Free//    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  //    02111-1307, USA////// Description:// /*  $Log: poastubs.cc,v $  Revision 1.2.2.12  2002/05/28 22:00:39  dgrisby  Incorrect repoIds.  Revision 1.2.2.11  2002/01/16 11:32:00  dpg1  Race condition in use of registerNilCorbaObject/registerTrackedObject.  (Reported by Teemu Torma).  Revision 1.2.2.10  2001/11/08 16:33:53  dpg1  Local servant POA shortcut policy.  Revision 1.2.2.9  2001/11/07 15:45:53  dpg1  Faster _ptrToInterface/_ptrToObjRef in common cases.  Revision 1.2.2.8  2001/10/17 16:44:07  dpg1  Update DynAny to CORBA 2.5 spec, const Any exception extraction.  Revision 1.2.2.7  2001/09/19 17:26:52  dpg1  Full clean-up after orb->destroy().  Revision 1.2.2.6  2001/08/15 10:26:14  dpg1  New object table behaviour, correct POA semantics.  Revision 1.2.2.5  2001/05/31 16:18:15  dpg1  inline string matching functions, re-ordered string matching in  _ptrToInterface/_ptrToObjRef  Revision 1.2.2.4  2001/05/29 17:03:53  dpg1  In process identity.  Revision 1.2.2.3  2001/04/18 18:18:05  sll  Big checkin with the brand new internal APIs.  Revision 1.2.2.2  2000/09/27 18:03:40  sll  Updated to use the new cdrStream abstraction.  Updated to match the changes in the proxyFactory class.  Revision 1.2.2.1  2000/07/17 10:35:57  sll  Merged from omni3_develop the diff between omni3_0_0_pre3 and omni3_0_0.  Revision 1.3  2000/07/13 15:25:56  dpg1  Merge from omni3_develop for 3.0 release.  Revision 1.1.2.5  2000/01/27 10:55:47  djr  Mods needed for powerpc_aix.  New macro OMNIORB_BASE_CTOR to provide  fqname for base class constructor for some compilers.  Revision 1.1.2.4  1999/10/29 13:18:19  djr  Changes to ensure mutexes are constructed when accessed.  Revision 1.1.2.3  1999/10/16 13:22:54  djr  Changes to support compiling on MSVC.  Revision 1.1.2.2  1999/10/04 17:08:34  djr  Some more fixes/MSVC work-arounds.  Revision 1.1.2.1  1999/09/22 14:27:03  djr  Major rewrite of orbcore to support POA.*/#include <omniORB4/CORBA.h>#include <omniORB4/callDescriptor.h>#include <omniORB4/objTracker.h>OMNI_USING_NAMESPACE(omni)///////////////////////////////////////////////////////////////////////////////////////////////// ForwardRequest /////////////////////////////////////////////////////////////////////////////////////////////////CORBA::Exception::insertExceptionToAny PortableServer::ForwardRequest::insertToAnyFn = 0;CORBA::Exception::insertExceptionToAnyNCP PortableServer::ForwardRequest::insertToAnyFnNCP = 0;PortableServer::ForwardRequest::ForwardRequest(const PortableServer::ForwardRequest& _s) : CORBA::UserException(_s){  forward_reference = _s.forward_reference;}PortableServer::ForwardRequest::ForwardRequest(CORBA::Object_ptr _forward_reference){  pd_insertToAnyFn    = PortableServer::ForwardRequest::insertToAnyFn;  pd_insertToAnyFnNCP = PortableServer::ForwardRequest::insertToAnyFnNCP;  CORBA::Object_Helper::duplicate(_forward_reference);  forward_reference = _forward_reference;}PortableServer::ForwardRequest& PortableServer::ForwardRequest::operator=(const PortableServer::ForwardRequest& _s){  ((CORBA::UserException*) this)->operator=(_s);  forward_reference = _s.forward_reference;  return *this;}PortableServer::ForwardRequest::~ForwardRequest() {}void PortableServer::ForwardRequest::_raise() const { throw *this; }PortableServer::ForwardRequest* PortableServer::ForwardRequest::_downcast(CORBA::Exception* e) {  return (ForwardRequest*) _NP_is_a(e, "Exception/UserException/PortableServer::ForwardRequest");}const PortableServer::ForwardRequest* PortableServer::ForwardRequest::_downcast(const CORBA::Exception* e) {  return (const ForwardRequest*) _NP_is_a(e, "Exception/UserException/PortableServer::ForwardRequest");}const char* PortableServer::ForwardRequest::_PD_repoId = "IDL:omg.org/PortableServer/ForwardRequest:1.0";CORBA::Exception* PortableServer::ForwardRequest::_NP_duplicate() const {  return new ForwardRequest(*this);}const char* PortableServer::ForwardRequest::_NP_typeId() const {  return "Exception/UserException/PortableServer::ForwardRequest";}const char* PortableServer::ForwardRequest::_NP_repoId(int* _size) const {  *_size = sizeof("IDL:omg.org/PortableServer/ForwardRequest:1.0");  return "IDL:omg.org/PortableServer/ForwardRequest:1.0";}void PortableServer::ForwardRequest::_NP_marshal(cdrStream& _s) const {  *this >>= _s;}voidPortableServer::ForwardRequest::operator>>= (cdrStream& _n) const{  CORBA::Object_Helper::marshalObjRef(forward_reference,_n);}voidPortableServer::ForwardRequest::operator<<= (cdrStream& _n){  forward_reference = CORBA::Object_Helper::unmarshalObjRef(_n);}PortableServer::AdapterActivator_ptr PortableServer::AdapterActivator_Helper::_nil() {  return PortableServer::AdapterActivator::_nil();}CORBA::Boolean PortableServer::AdapterActivator_Helper::is_nil(PortableServer::AdapterActivator_ptr p) {  return CORBA::is_nil(p);}void PortableServer::AdapterActivator_Helper::release(PortableServer::AdapterActivator_ptr p) {  CORBA::release(p);}void PortableServer::AdapterActivator_Helper::duplicate(PortableServer::AdapterActivator_ptr p) {  if( p && !p->_NP_is_nil() )  omni::duplicateObjRef(p);}void PortableServer::AdapterActivator_Helper::marshalObjRef(PortableServer::AdapterActivator_ptr obj, cdrStream& s) {  PortableServer::AdapterActivator::_marshalObjRef(obj, s);}PortableServer::AdapterActivator_ptr PortableServer::AdapterActivator_Helper::unmarshalObjRef(cdrStream& s) {  return PortableServer::AdapterActivator::_unmarshalObjRef(s);}PortableServer::AdapterActivator_ptrPortableServer::AdapterActivator::_duplicate(PortableServer::AdapterActivator_ptr obj){  if( obj && !obj->_NP_is_nil() )  omni::duplicateObjRef(obj);  return obj;}PortableServer::AdapterActivator_ptrPortableServer::AdapterActivator::_narrow(CORBA::Object_ptr obj){  if( !obj || obj->_NP_is_nil() || obj->_NP_is_pseudo() ) return _nil();  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);  return e ? e : _nil();}PortableServer::AdapterActivator_ptrPortableServer::AdapterActivator::_nil(){  static _objref_AdapterActivator* _the_nil_ptr = 0;  if( !_the_nil_ptr ) {    omni::nilRefLock().lock();    if( !_the_nil_ptr ) {      _the_nil_ptr = new _objref_AdapterActivator();      registerNilCorbaObject(_the_nil_ptr);    }    omni::nilRefLock().unlock();  }  return _the_nil_ptr;}const char* PortableServer::AdapterActivator::_PD_repoId = "IDL:omg.org/PortableServer/AdapterActivator:1.0";PortableServer::_objref_AdapterActivator::~_objref_AdapterActivator() {}PortableServer::_objref_AdapterActivator::_objref_AdapterActivator(omniIOR* ior,         omniIdentity* id) : omniObjRef(PortableServer::AdapterActivator::_PD_repoId, ior, id, 1){  _PR_setobj(this);}void*PortableServer::_objref_AdapterActivator::_ptrToObjRef(const char* id){  if( id == PortableServer::AdapterActivator::_PD_repoId )    return (PortableServer::AdapterActivator_ptr) this;  if( id == CORBA::Object::_PD_repoId )    return (CORBA::Object_ptr) this;  if( omni::strMatch(id, PortableServer::AdapterActivator::_PD_repoId) )    return (PortableServer::AdapterActivator_ptr) this;  if( omni::strMatch(id, CORBA::Object::_PD_repoId) )    return (CORBA::Object_ptr) this;  return 0;}// Proxy call descriptor class. Mangled signature://  _cboolean_i_cPortableServer_mPOA_i_cstringclass _0RL_cd_3c165f58b5a16b59_00000000  : public omniLocalOnlyCallDescriptor{public:  inline _0RL_cd_3c165f58b5a16b59_00000000(LocalCallFn lcfn, const char* op, size_t oplen, _CORBA_Boolean oneway, PortableServer::POA_ptr a_0, const char* a_1) :    omniLocalOnlyCallDescriptor(lcfn, op, oplen, oneway),    arg_0(a_0),    arg_1(a_1)  {}  inline CORBA::Boolean result() { return pd_result; }  PortableServer::POA_ptr arg_0;  const char* arg_1;  CORBA::Boolean pd_result;};// Local call call-back function.static void_0RL_lcfn_3c165f58b5a16b59_10000000(omniCallDescriptor* cd, omniServant* svnt){  _0RL_cd_3c165f58b5a16b59_00000000* tcd = (_0RL_cd_3c165f58b5a16b59_00000000*) cd;  PortableServer::_impl_AdapterActivator* impl = (PortableServer::_impl_AdapterActivator*) svnt->_ptrToInterface(PortableServer::AdapterActivator::_PD_repoId);  tcd->pd_result = impl->unknown_adapter(tcd->arg_0, tcd->arg_1);}CORBA::Boolean PortableServer::_objref_AdapterActivator::unknown_adapter(PortableServer::POA_ptr parent, const char* name){  _0RL_cd_3c165f58b5a16b59_00000000 _call_desc(_0RL_lcfn_3c165f58b5a16b59_10000000, "unknown_adapter", 16, 0, parent, name);  _invoke(_call_desc);  return _call_desc.result();}PortableServer::_pof_AdapterActivator::~_pof_AdapterActivator() {}omniObjRef*PortableServer::_pof_AdapterActivator::newObjRef(omniIOR* ior,omniIdentity* id){  return new PortableServer::_objref_AdapterActivator(ior, id);}CORBA::BooleanPortableServer::_pof_AdapterActivator::is_a(const char* id) const{  if( omni::ptrStrMatch(id, PortableServer::AdapterActivator::_PD_repoId) )    return 1;  return 0;}const PortableServer::_pof_AdapterActivator _the_pof_PortableServer_mAdapterActivator;PortableServer::_impl_AdapterActivator::~_impl_AdapterActivator() {}CORBA::BooleanPortableServer::_impl_AdapterActivator::_dispatch(omniCallHandle& handle){  return 0;}void*PortableServer::_impl_AdapterActivator::_ptrToInterface(const char* id){  if( id == PortableServer::AdapterActivator::_PD_repoId )    return (_impl_AdapterActivator*) this;  if( id == CORBA::Object::_PD_repoId )    return (void*) 1;  if( omni::strMatch(id, PortableServer::AdapterActivator::_PD_repoId) )    return (_impl_AdapterActivator*) this;  if( omni::strMatch(id, CORBA::Object::_PD_repoId) )    return (void*) 1;  return 0;}const char*PortableServer::_impl_AdapterActivator::_mostDerivedRepoId(){  return PortableServer::AdapterActivator::_PD_repoId;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -