// This file is generated by omniidl (C++ backend) - omniORB_4_3. Do not edit.

#include "CosEventChannelAdmin.hh"
#include <omniORB4/IOP_S.h>
#include <omniORB4/IOP_C.h>
#include <omniORB4/callDescriptor.h>
#include <omniORB4/callHandle.h>
#include <omniORB4/objTracker.h>


OMNI_USING_NAMESPACE(omni)

OMNI_MAYBE_UNUSED static const char* _0RL_library_version = omniORB_4_3;



::CORBA::Exception::insertExceptionToAny CosEventChannelAdmin::AlreadyConnected::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosEventChannelAdmin::AlreadyConnected::insertToAnyFnNCP = 0;

CosEventChannelAdmin::AlreadyConnected::AlreadyConnected(const CosEventChannelAdmin::AlreadyConnected& _s) : ::CORBA::UserException(_s)
{
  
}



CosEventChannelAdmin::AlreadyConnected& CosEventChannelAdmin::AlreadyConnected::operator=(const CosEventChannelAdmin::AlreadyConnected& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    
  }
  return *this;
}

CosEventChannelAdmin::AlreadyConnected::~AlreadyConnected() {}

void CosEventChannelAdmin::AlreadyConnected::_raise() const { throw *this; }

const char* CosEventChannelAdmin::AlreadyConnected::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0";
const char* CosEventChannelAdmin::AlreadyConnected::_PD_typeId = "Exception/UserException/CosEventChannelAdmin::AlreadyConnected";

CosEventChannelAdmin::AlreadyConnected* CosEventChannelAdmin::AlreadyConnected::_downcast(::CORBA::Exception* _e) {
  return (AlreadyConnected*) _NP_is_a(_e, _PD_typeId);
}

const CosEventChannelAdmin::AlreadyConnected* CosEventChannelAdmin::AlreadyConnected::_downcast(const ::CORBA::Exception* _e) {
  return (const AlreadyConnected*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosEventChannelAdmin::AlreadyConnected::_NP_duplicate() const {
  return new AlreadyConnected(*this);
}

const char* CosEventChannelAdmin::AlreadyConnected::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosEventChannelAdmin::AlreadyConnected::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0");
  return _PD_repoId;
}
 
void CosEventChannelAdmin::AlreadyConnected::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

::CORBA::Exception::insertExceptionToAny CosEventChannelAdmin::TypeError::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosEventChannelAdmin::TypeError::insertToAnyFnNCP = 0;

CosEventChannelAdmin::TypeError::TypeError(const CosEventChannelAdmin::TypeError& _s) : ::CORBA::UserException(_s)
{
  
}



CosEventChannelAdmin::TypeError& CosEventChannelAdmin::TypeError::operator=(const CosEventChannelAdmin::TypeError& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    
  }
  return *this;
}

CosEventChannelAdmin::TypeError::~TypeError() {}

void CosEventChannelAdmin::TypeError::_raise() const { throw *this; }

const char* CosEventChannelAdmin::TypeError::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/TypeError:1.0";
const char* CosEventChannelAdmin::TypeError::_PD_typeId = "Exception/UserException/CosEventChannelAdmin::TypeError";

CosEventChannelAdmin::TypeError* CosEventChannelAdmin::TypeError::_downcast(::CORBA::Exception* _e) {
  return (TypeError*) _NP_is_a(_e, _PD_typeId);
}

const CosEventChannelAdmin::TypeError* CosEventChannelAdmin::TypeError::_downcast(const ::CORBA::Exception* _e) {
  return (const TypeError*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosEventChannelAdmin::TypeError::_NP_duplicate() const {
  return new TypeError(*this);
}

const char* CosEventChannelAdmin::TypeError::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosEventChannelAdmin::TypeError::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosEventChannelAdmin/TypeError:1.0");
  return _PD_repoId;
}
 
void CosEventChannelAdmin::TypeError::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

CosEventChannelAdmin::ProxyPushConsumer_ptr CosEventChannelAdmin::ProxyPushConsumer_Helper::_nil() {
  return ::CosEventChannelAdmin::ProxyPushConsumer::_nil();
}

::CORBA::Boolean CosEventChannelAdmin::ProxyPushConsumer_Helper::is_nil(::CosEventChannelAdmin::ProxyPushConsumer_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosEventChannelAdmin::ProxyPushConsumer_Helper::release(::CosEventChannelAdmin::ProxyPushConsumer_ptr p) {
  ::CORBA::release(p);
}

void CosEventChannelAdmin::ProxyPushConsumer_Helper::marshalObjRef(::CosEventChannelAdmin::ProxyPushConsumer_ptr obj, cdrStream& s) {
  ::CosEventChannelAdmin::ProxyPushConsumer::_marshalObjRef(obj, s);
}

CosEventChannelAdmin::ProxyPushConsumer_ptr CosEventChannelAdmin::ProxyPushConsumer_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosEventChannelAdmin::ProxyPushConsumer::_unmarshalObjRef(s);
}

void CosEventChannelAdmin::ProxyPushConsumer_Helper::duplicate(::CosEventChannelAdmin::ProxyPushConsumer_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosEventChannelAdmin::ProxyPushConsumer_ptr
CosEventChannelAdmin::ProxyPushConsumer::_duplicate(::CosEventChannelAdmin::ProxyPushConsumer_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosEventChannelAdmin::ProxyPushConsumer_ptr
CosEventChannelAdmin::ProxyPushConsumer::_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();
}


CosEventChannelAdmin::ProxyPushConsumer_ptr
CosEventChannelAdmin::ProxyPushConsumer::_unchecked_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()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosEventChannelAdmin::ProxyPushConsumer_ptr
CosEventChannelAdmin::ProxyPushConsumer::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_ProxyPushConsumer _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_ProxyPushConsumer* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_ProxyPushConsumer;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/ProxyPushConsumer:1.0";


typedef CosEventComm::PushConsumer CosEventComm_PushConsumer;
typedef CosEventComm::_impl_PushConsumer CosEventComm__impl_PushConsumer;
typedef CosEventComm::_objref_PushConsumer CosEventComm__objref_PushConsumer;

CosEventChannelAdmin::_objref_ProxyPushConsumer::~_objref_ProxyPushConsumer() {
  
}


CosEventChannelAdmin::_objref_ProxyPushConsumer::_objref_ProxyPushConsumer(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId, ior, id, 1),
   CosEventComm__objref_PushConsumer(ior, id)
   
{
  _PR_setobj(this);
}

void*
CosEventChannelAdmin::_objref_ProxyPushConsumer::_ptrToObjRef(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId)
    return (::CosEventChannelAdmin::ProxyPushConsumer_ptr) this;
  if (id == ::CosEventComm::PushConsumer::_PD_repoId)
    return (::CosEventComm::PushConsumer_ptr) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId))
    return (::CosEventChannelAdmin::ProxyPushConsumer_ptr) this;
  if (omni::strMatch(id, ::CosEventComm::PushConsumer::_PD_repoId))
    return (::CosEventComm::PushConsumer_ptr) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosEventChannelAdmin::ProxyPushConsumer::connect_push_supplier

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosEventComm_mPushSupplier_e_cCosEventChannelAdmin_mAlreadyConnected
class _0RL_cd_f894c8374a428e70_00000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_00000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 1, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosEventComm::PushSupplier_var arg_0_;
  CosEventComm::PushSupplier_ptr arg_0;
};

void _0RL_cd_f894c8374a428e70_00000000::marshalArguments(cdrStream& _n)
{
  CosEventComm::PushSupplier::_marshalObjRef(arg_0,_n);

}

void _0RL_cd_f894c8374a428e70_00000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = CosEventComm::PushSupplier::_unmarshalObjRef(_n);
  arg_0 = arg_0_.in();

}

const char* const _0RL_cd_f894c8374a428e70_00000000::_user_exns[] = {
  CosEventChannelAdmin::AlreadyConnected::_PD_repoId
};

void _0RL_cd_f894c8374a428e70_00000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosEventChannelAdmin::AlreadyConnected::_PD_repoId)) {
    CosEventChannelAdmin::AlreadyConnected _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_10000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_00000000* tcd = (_0RL_cd_f894c8374a428e70_00000000*)cd;
  CosEventChannelAdmin::_impl_ProxyPushConsumer* impl = (CosEventChannelAdmin::_impl_ProxyPushConsumer*) svnt->_ptrToInterface(CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->connect_push_supplier(tcd->arg_0);
#else
  if (!cd->is_upcall())
    impl->connect_push_supplier(tcd->arg_0);
  else {
    try {
      impl->connect_push_supplier(tcd->arg_0);
    }
    catch(CosEventChannelAdmin::AlreadyConnected& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosEventChannelAdmin::_objref_ProxyPushConsumer::connect_push_supplier(::CosEventComm::PushSupplier_ptr push_supplier)
{
  _0RL_cd_f894c8374a428e70_00000000 _call_desc(_0RL_lcfn_f894c8374a428e70_10000000, "connect_push_supplier", 22);
  _call_desc.arg_0 = push_supplier;

  _invoke(_call_desc);



}

CosEventChannelAdmin::_pof_ProxyPushConsumer::~_pof_ProxyPushConsumer() {}


omniObjRef*
CosEventChannelAdmin::_pof_ProxyPushConsumer::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosEventChannelAdmin::_objref_ProxyPushConsumer(ior, id);
}


::CORBA::Boolean
CosEventChannelAdmin::_pof_ProxyPushConsumer::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId))
    return 1;
  if (omni::ptrStrMatch(id, CosEventComm::PushConsumer::_PD_repoId))
    return 1;


  return 0;
}

const CosEventChannelAdmin::_pof_ProxyPushConsumer _the_pof_CosEventChannelAdmin_mProxyPushConsumer;

CosEventChannelAdmin::_impl_ProxyPushConsumer::~_impl_ProxyPushConsumer() {}


::CORBA::Boolean
CosEventChannelAdmin::_impl_ProxyPushConsumer::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "connect_push_supplier")) {

    _0RL_cd_f894c8374a428e70_00000000 _call_desc(_0RL_lcfn_f894c8374a428e70_10000000, "connect_push_supplier", 22, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  
#ifndef _MSC_VER
  if (CosEventComm__impl_PushConsumer::_dispatch(_handle)) {
    return 1;
  }
#else
  // Work-around for incorrect MSVC code generation.
  if (((CosEventComm__impl_PushConsumer*)this)->
      CosEventComm__impl_PushConsumer::_dispatch(_handle)) {
    return 1;
  }
#endif


  return 0;
}

void*
CosEventChannelAdmin::_impl_ProxyPushConsumer::_ptrToInterface(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId)
    return (::CosEventChannelAdmin::_impl_ProxyPushConsumer*) this;
  if (id == ::CosEventComm::PushConsumer::_PD_repoId)
    return (::CosEventComm::_impl_PushConsumer*) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId))
    return (::CosEventChannelAdmin::_impl_ProxyPushConsumer*) this;
  if (omni::strMatch(id, ::CosEventComm::PushConsumer::_PD_repoId))
    return (::CosEventComm::_impl_PushConsumer*) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosEventChannelAdmin::_impl_ProxyPushConsumer::_mostDerivedRepoId()
{
  return ::CosEventChannelAdmin::ProxyPushConsumer::_PD_repoId;
}

CosEventChannelAdmin::ProxyPullSupplier_ptr CosEventChannelAdmin::ProxyPullSupplier_Helper::_nil() {
  return ::CosEventChannelAdmin::ProxyPullSupplier::_nil();
}

::CORBA::Boolean CosEventChannelAdmin::ProxyPullSupplier_Helper::is_nil(::CosEventChannelAdmin::ProxyPullSupplier_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosEventChannelAdmin::ProxyPullSupplier_Helper::release(::CosEventChannelAdmin::ProxyPullSupplier_ptr p) {
  ::CORBA::release(p);
}

void CosEventChannelAdmin::ProxyPullSupplier_Helper::marshalObjRef(::CosEventChannelAdmin::ProxyPullSupplier_ptr obj, cdrStream& s) {
  ::CosEventChannelAdmin::ProxyPullSupplier::_marshalObjRef(obj, s);
}

CosEventChannelAdmin::ProxyPullSupplier_ptr CosEventChannelAdmin::ProxyPullSupplier_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosEventChannelAdmin::ProxyPullSupplier::_unmarshalObjRef(s);
}

void CosEventChannelAdmin::ProxyPullSupplier_Helper::duplicate(::CosEventChannelAdmin::ProxyPullSupplier_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosEventChannelAdmin::ProxyPullSupplier_ptr
CosEventChannelAdmin::ProxyPullSupplier::_duplicate(::CosEventChannelAdmin::ProxyPullSupplier_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosEventChannelAdmin::ProxyPullSupplier_ptr
CosEventChannelAdmin::ProxyPullSupplier::_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();
}


CosEventChannelAdmin::ProxyPullSupplier_ptr
CosEventChannelAdmin::ProxyPullSupplier::_unchecked_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()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosEventChannelAdmin::ProxyPullSupplier_ptr
CosEventChannelAdmin::ProxyPullSupplier::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_ProxyPullSupplier _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_ProxyPullSupplier* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_ProxyPullSupplier;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0";


typedef CosEventComm::PullSupplier CosEventComm_PullSupplier;
typedef CosEventComm::_impl_PullSupplier CosEventComm__impl_PullSupplier;
typedef CosEventComm::_objref_PullSupplier CosEventComm__objref_PullSupplier;

CosEventChannelAdmin::_objref_ProxyPullSupplier::~_objref_ProxyPullSupplier() {
  
}


CosEventChannelAdmin::_objref_ProxyPullSupplier::_objref_ProxyPullSupplier(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId, ior, id, 1),
   CosEventComm__objref_PullSupplier(ior, id)
   
{
  _PR_setobj(this);
}

void*
CosEventChannelAdmin::_objref_ProxyPullSupplier::_ptrToObjRef(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId)
    return (::CosEventChannelAdmin::ProxyPullSupplier_ptr) this;
  if (id == ::CosEventComm::PullSupplier::_PD_repoId)
    return (::CosEventComm::PullSupplier_ptr) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId))
    return (::CosEventChannelAdmin::ProxyPullSupplier_ptr) this;
  if (omni::strMatch(id, ::CosEventComm::PullSupplier::_PD_repoId))
    return (::CosEventComm::PullSupplier_ptr) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosEventChannelAdmin::ProxyPullSupplier::connect_pull_consumer

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosEventComm_mPullConsumer_e_cCosEventChannelAdmin_mAlreadyConnected
class _0RL_cd_f894c8374a428e70_20000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_20000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 1, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosEventComm::PullConsumer_var arg_0_;
  CosEventComm::PullConsumer_ptr arg_0;
};

void _0RL_cd_f894c8374a428e70_20000000::marshalArguments(cdrStream& _n)
{
  CosEventComm::PullConsumer::_marshalObjRef(arg_0,_n);

}

void _0RL_cd_f894c8374a428e70_20000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = CosEventComm::PullConsumer::_unmarshalObjRef(_n);
  arg_0 = arg_0_.in();

}

const char* const _0RL_cd_f894c8374a428e70_20000000::_user_exns[] = {
  CosEventChannelAdmin::AlreadyConnected::_PD_repoId
};

void _0RL_cd_f894c8374a428e70_20000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosEventChannelAdmin::AlreadyConnected::_PD_repoId)) {
    CosEventChannelAdmin::AlreadyConnected _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_30000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_20000000* tcd = (_0RL_cd_f894c8374a428e70_20000000*)cd;
  CosEventChannelAdmin::_impl_ProxyPullSupplier* impl = (CosEventChannelAdmin::_impl_ProxyPullSupplier*) svnt->_ptrToInterface(CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->connect_pull_consumer(tcd->arg_0);
#else
  if (!cd->is_upcall())
    impl->connect_pull_consumer(tcd->arg_0);
  else {
    try {
      impl->connect_pull_consumer(tcd->arg_0);
    }
    catch(CosEventChannelAdmin::AlreadyConnected& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosEventChannelAdmin::_objref_ProxyPullSupplier::connect_pull_consumer(::CosEventComm::PullConsumer_ptr pull_consumer)
{
  _0RL_cd_f894c8374a428e70_20000000 _call_desc(_0RL_lcfn_f894c8374a428e70_30000000, "connect_pull_consumer", 22);
  _call_desc.arg_0 = pull_consumer;

  _invoke(_call_desc);



}

CosEventChannelAdmin::_pof_ProxyPullSupplier::~_pof_ProxyPullSupplier() {}


omniObjRef*
CosEventChannelAdmin::_pof_ProxyPullSupplier::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosEventChannelAdmin::_objref_ProxyPullSupplier(ior, id);
}


::CORBA::Boolean
CosEventChannelAdmin::_pof_ProxyPullSupplier::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId))
    return 1;
  if (omni::ptrStrMatch(id, CosEventComm::PullSupplier::_PD_repoId))
    return 1;


  return 0;
}

const CosEventChannelAdmin::_pof_ProxyPullSupplier _the_pof_CosEventChannelAdmin_mProxyPullSupplier;

CosEventChannelAdmin::_impl_ProxyPullSupplier::~_impl_ProxyPullSupplier() {}


::CORBA::Boolean
CosEventChannelAdmin::_impl_ProxyPullSupplier::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "connect_pull_consumer")) {

    _0RL_cd_f894c8374a428e70_20000000 _call_desc(_0RL_lcfn_f894c8374a428e70_30000000, "connect_pull_consumer", 22, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  
#ifndef _MSC_VER
  if (CosEventComm__impl_PullSupplier::_dispatch(_handle)) {
    return 1;
  }
#else
  // Work-around for incorrect MSVC code generation.
  if (((CosEventComm__impl_PullSupplier*)this)->
      CosEventComm__impl_PullSupplier::_dispatch(_handle)) {
    return 1;
  }
#endif


  return 0;
}

void*
CosEventChannelAdmin::_impl_ProxyPullSupplier::_ptrToInterface(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId)
    return (::CosEventChannelAdmin::_impl_ProxyPullSupplier*) this;
  if (id == ::CosEventComm::PullSupplier::_PD_repoId)
    return (::CosEventComm::_impl_PullSupplier*) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId))
    return (::CosEventChannelAdmin::_impl_ProxyPullSupplier*) this;
  if (omni::strMatch(id, ::CosEventComm::PullSupplier::_PD_repoId))
    return (::CosEventComm::_impl_PullSupplier*) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosEventChannelAdmin::_impl_ProxyPullSupplier::_mostDerivedRepoId()
{
  return ::CosEventChannelAdmin::ProxyPullSupplier::_PD_repoId;
}

CosEventChannelAdmin::ProxyPullConsumer_ptr CosEventChannelAdmin::ProxyPullConsumer_Helper::_nil() {
  return ::CosEventChannelAdmin::ProxyPullConsumer::_nil();
}

::CORBA::Boolean CosEventChannelAdmin::ProxyPullConsumer_Helper::is_nil(::CosEventChannelAdmin::ProxyPullConsumer_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosEventChannelAdmin::ProxyPullConsumer_Helper::release(::CosEventChannelAdmin::ProxyPullConsumer_ptr p) {
  ::CORBA::release(p);
}

void CosEventChannelAdmin::ProxyPullConsumer_Helper::marshalObjRef(::CosEventChannelAdmin::ProxyPullConsumer_ptr obj, cdrStream& s) {
  ::CosEventChannelAdmin::ProxyPullConsumer::_marshalObjRef(obj, s);
}

CosEventChannelAdmin::ProxyPullConsumer_ptr CosEventChannelAdmin::ProxyPullConsumer_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosEventChannelAdmin::ProxyPullConsumer::_unmarshalObjRef(s);
}

void CosEventChannelAdmin::ProxyPullConsumer_Helper::duplicate(::CosEventChannelAdmin::ProxyPullConsumer_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosEventChannelAdmin::ProxyPullConsumer_ptr
CosEventChannelAdmin::ProxyPullConsumer::_duplicate(::CosEventChannelAdmin::ProxyPullConsumer_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosEventChannelAdmin::ProxyPullConsumer_ptr
CosEventChannelAdmin::ProxyPullConsumer::_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();
}


CosEventChannelAdmin::ProxyPullConsumer_ptr
CosEventChannelAdmin::ProxyPullConsumer::_unchecked_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()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosEventChannelAdmin::ProxyPullConsumer_ptr
CosEventChannelAdmin::ProxyPullConsumer::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_ProxyPullConsumer _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_ProxyPullConsumer* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_ProxyPullConsumer;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/ProxyPullConsumer:1.0";


typedef CosEventComm::PullConsumer CosEventComm_PullConsumer;
typedef CosEventComm::_impl_PullConsumer CosEventComm__impl_PullConsumer;
typedef CosEventComm::_objref_PullConsumer CosEventComm__objref_PullConsumer;

CosEventChannelAdmin::_objref_ProxyPullConsumer::~_objref_ProxyPullConsumer() {
  
}


CosEventChannelAdmin::_objref_ProxyPullConsumer::_objref_ProxyPullConsumer(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId, ior, id, 1),
   CosEventComm__objref_PullConsumer(ior, id)
   
{
  _PR_setobj(this);
}

void*
CosEventChannelAdmin::_objref_ProxyPullConsumer::_ptrToObjRef(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId)
    return (::CosEventChannelAdmin::ProxyPullConsumer_ptr) this;
  if (id == ::CosEventComm::PullConsumer::_PD_repoId)
    return (::CosEventComm::PullConsumer_ptr) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId))
    return (::CosEventChannelAdmin::ProxyPullConsumer_ptr) this;
  if (omni::strMatch(id, ::CosEventComm::PullConsumer::_PD_repoId))
    return (::CosEventComm::PullConsumer_ptr) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosEventChannelAdmin::ProxyPullConsumer::connect_pull_supplier

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosEventComm_mPullSupplier_e_cCosEventChannelAdmin_mAlreadyConnected_e_cCosEventChannelAdmin_mTypeError
class _0RL_cd_f894c8374a428e70_40000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_40000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 2, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosEventComm::PullSupplier_var arg_0_;
  CosEventComm::PullSupplier_ptr arg_0;
};

void _0RL_cd_f894c8374a428e70_40000000::marshalArguments(cdrStream& _n)
{
  CosEventComm::PullSupplier::_marshalObjRef(arg_0,_n);

}

void _0RL_cd_f894c8374a428e70_40000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = CosEventComm::PullSupplier::_unmarshalObjRef(_n);
  arg_0 = arg_0_.in();

}

const char* const _0RL_cd_f894c8374a428e70_40000000::_user_exns[] = {
  CosEventChannelAdmin::AlreadyConnected::_PD_repoId,
  CosEventChannelAdmin::TypeError::_PD_repoId
};

void _0RL_cd_f894c8374a428e70_40000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosEventChannelAdmin::AlreadyConnected::_PD_repoId)) {
    CosEventChannelAdmin::AlreadyConnected _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosEventChannelAdmin::TypeError::_PD_repoId)) {
    CosEventChannelAdmin::TypeError _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_50000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_40000000* tcd = (_0RL_cd_f894c8374a428e70_40000000*)cd;
  CosEventChannelAdmin::_impl_ProxyPullConsumer* impl = (CosEventChannelAdmin::_impl_ProxyPullConsumer*) svnt->_ptrToInterface(CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->connect_pull_supplier(tcd->arg_0);
#else
  if (!cd->is_upcall())
    impl->connect_pull_supplier(tcd->arg_0);
  else {
    try {
      impl->connect_pull_supplier(tcd->arg_0);
    }
    catch(CosEventChannelAdmin::AlreadyConnected& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosEventChannelAdmin::TypeError& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosEventChannelAdmin::_objref_ProxyPullConsumer::connect_pull_supplier(::CosEventComm::PullSupplier_ptr pull_supplier)
{
  _0RL_cd_f894c8374a428e70_40000000 _call_desc(_0RL_lcfn_f894c8374a428e70_50000000, "connect_pull_supplier", 22);
  _call_desc.arg_0 = pull_supplier;

  _invoke(_call_desc);



}

CosEventChannelAdmin::_pof_ProxyPullConsumer::~_pof_ProxyPullConsumer() {}


omniObjRef*
CosEventChannelAdmin::_pof_ProxyPullConsumer::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosEventChannelAdmin::_objref_ProxyPullConsumer(ior, id);
}


::CORBA::Boolean
CosEventChannelAdmin::_pof_ProxyPullConsumer::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId))
    return 1;
  if (omni::ptrStrMatch(id, CosEventComm::PullConsumer::_PD_repoId))
    return 1;


  return 0;
}

const CosEventChannelAdmin::_pof_ProxyPullConsumer _the_pof_CosEventChannelAdmin_mProxyPullConsumer;

CosEventChannelAdmin::_impl_ProxyPullConsumer::~_impl_ProxyPullConsumer() {}


::CORBA::Boolean
CosEventChannelAdmin::_impl_ProxyPullConsumer::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "connect_pull_supplier")) {

    _0RL_cd_f894c8374a428e70_40000000 _call_desc(_0RL_lcfn_f894c8374a428e70_50000000, "connect_pull_supplier", 22, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  
#ifndef _MSC_VER
  if (CosEventComm__impl_PullConsumer::_dispatch(_handle)) {
    return 1;
  }
#else
  // Work-around for incorrect MSVC code generation.
  if (((CosEventComm__impl_PullConsumer*)this)->
      CosEventComm__impl_PullConsumer::_dispatch(_handle)) {
    return 1;
  }
#endif


  return 0;
}

void*
CosEventChannelAdmin::_impl_ProxyPullConsumer::_ptrToInterface(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId)
    return (::CosEventChannelAdmin::_impl_ProxyPullConsumer*) this;
  if (id == ::CosEventComm::PullConsumer::_PD_repoId)
    return (::CosEventComm::_impl_PullConsumer*) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId))
    return (::CosEventChannelAdmin::_impl_ProxyPullConsumer*) this;
  if (omni::strMatch(id, ::CosEventComm::PullConsumer::_PD_repoId))
    return (::CosEventComm::_impl_PullConsumer*) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosEventChannelAdmin::_impl_ProxyPullConsumer::_mostDerivedRepoId()
{
  return ::CosEventChannelAdmin::ProxyPullConsumer::_PD_repoId;
}

CosEventChannelAdmin::ProxyPushSupplier_ptr CosEventChannelAdmin::ProxyPushSupplier_Helper::_nil() {
  return ::CosEventChannelAdmin::ProxyPushSupplier::_nil();
}

::CORBA::Boolean CosEventChannelAdmin::ProxyPushSupplier_Helper::is_nil(::CosEventChannelAdmin::ProxyPushSupplier_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosEventChannelAdmin::ProxyPushSupplier_Helper::release(::CosEventChannelAdmin::ProxyPushSupplier_ptr p) {
  ::CORBA::release(p);
}

void CosEventChannelAdmin::ProxyPushSupplier_Helper::marshalObjRef(::CosEventChannelAdmin::ProxyPushSupplier_ptr obj, cdrStream& s) {
  ::CosEventChannelAdmin::ProxyPushSupplier::_marshalObjRef(obj, s);
}

CosEventChannelAdmin::ProxyPushSupplier_ptr CosEventChannelAdmin::ProxyPushSupplier_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosEventChannelAdmin::ProxyPushSupplier::_unmarshalObjRef(s);
}

void CosEventChannelAdmin::ProxyPushSupplier_Helper::duplicate(::CosEventChannelAdmin::ProxyPushSupplier_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosEventChannelAdmin::ProxyPushSupplier_ptr
CosEventChannelAdmin::ProxyPushSupplier::_duplicate(::CosEventChannelAdmin::ProxyPushSupplier_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosEventChannelAdmin::ProxyPushSupplier_ptr
CosEventChannelAdmin::ProxyPushSupplier::_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();
}


CosEventChannelAdmin::ProxyPushSupplier_ptr
CosEventChannelAdmin::ProxyPushSupplier::_unchecked_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()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosEventChannelAdmin::ProxyPushSupplier_ptr
CosEventChannelAdmin::ProxyPushSupplier::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_ProxyPushSupplier _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_ProxyPushSupplier* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_ProxyPushSupplier;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/ProxyPushSupplier:1.0";


typedef CosEventComm::PushSupplier CosEventComm_PushSupplier;
typedef CosEventComm::_impl_PushSupplier CosEventComm__impl_PushSupplier;
typedef CosEventComm::_objref_PushSupplier CosEventComm__objref_PushSupplier;

CosEventChannelAdmin::_objref_ProxyPushSupplier::~_objref_ProxyPushSupplier() {
  
}


CosEventChannelAdmin::_objref_ProxyPushSupplier::_objref_ProxyPushSupplier(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId, ior, id, 1),
   CosEventComm__objref_PushSupplier(ior, id)
   
{
  _PR_setobj(this);
}

void*
CosEventChannelAdmin::_objref_ProxyPushSupplier::_ptrToObjRef(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId)
    return (::CosEventChannelAdmin::ProxyPushSupplier_ptr) this;
  if (id == ::CosEventComm::PushSupplier::_PD_repoId)
    return (::CosEventComm::PushSupplier_ptr) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId))
    return (::CosEventChannelAdmin::ProxyPushSupplier_ptr) this;
  if (omni::strMatch(id, ::CosEventComm::PushSupplier::_PD_repoId))
    return (::CosEventComm::PushSupplier_ptr) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosEventChannelAdmin::ProxyPushSupplier::connect_push_consumer

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosEventComm_mPushConsumer_e_cCosEventChannelAdmin_mAlreadyConnected_e_cCosEventChannelAdmin_mTypeError
class _0RL_cd_f894c8374a428e70_60000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_60000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 2, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosEventComm::PushConsumer_var arg_0_;
  CosEventComm::PushConsumer_ptr arg_0;
};

void _0RL_cd_f894c8374a428e70_60000000::marshalArguments(cdrStream& _n)
{
  CosEventComm::PushConsumer::_marshalObjRef(arg_0,_n);

}

void _0RL_cd_f894c8374a428e70_60000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = CosEventComm::PushConsumer::_unmarshalObjRef(_n);
  arg_0 = arg_0_.in();

}

const char* const _0RL_cd_f894c8374a428e70_60000000::_user_exns[] = {
  CosEventChannelAdmin::AlreadyConnected::_PD_repoId,
  CosEventChannelAdmin::TypeError::_PD_repoId
};

void _0RL_cd_f894c8374a428e70_60000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosEventChannelAdmin::AlreadyConnected::_PD_repoId)) {
    CosEventChannelAdmin::AlreadyConnected _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosEventChannelAdmin::TypeError::_PD_repoId)) {
    CosEventChannelAdmin::TypeError _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_70000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_60000000* tcd = (_0RL_cd_f894c8374a428e70_60000000*)cd;
  CosEventChannelAdmin::_impl_ProxyPushSupplier* impl = (CosEventChannelAdmin::_impl_ProxyPushSupplier*) svnt->_ptrToInterface(CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->connect_push_consumer(tcd->arg_0);
#else
  if (!cd->is_upcall())
    impl->connect_push_consumer(tcd->arg_0);
  else {
    try {
      impl->connect_push_consumer(tcd->arg_0);
    }
    catch(CosEventChannelAdmin::AlreadyConnected& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosEventChannelAdmin::TypeError& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosEventChannelAdmin::_objref_ProxyPushSupplier::connect_push_consumer(::CosEventComm::PushConsumer_ptr push_consumer)
{
  _0RL_cd_f894c8374a428e70_60000000 _call_desc(_0RL_lcfn_f894c8374a428e70_70000000, "connect_push_consumer", 22);
  _call_desc.arg_0 = push_consumer;

  _invoke(_call_desc);



}

CosEventChannelAdmin::_pof_ProxyPushSupplier::~_pof_ProxyPushSupplier() {}


omniObjRef*
CosEventChannelAdmin::_pof_ProxyPushSupplier::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosEventChannelAdmin::_objref_ProxyPushSupplier(ior, id);
}


::CORBA::Boolean
CosEventChannelAdmin::_pof_ProxyPushSupplier::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId))
    return 1;
  if (omni::ptrStrMatch(id, CosEventComm::PushSupplier::_PD_repoId))
    return 1;


  return 0;
}

const CosEventChannelAdmin::_pof_ProxyPushSupplier _the_pof_CosEventChannelAdmin_mProxyPushSupplier;

CosEventChannelAdmin::_impl_ProxyPushSupplier::~_impl_ProxyPushSupplier() {}


::CORBA::Boolean
CosEventChannelAdmin::_impl_ProxyPushSupplier::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "connect_push_consumer")) {

    _0RL_cd_f894c8374a428e70_60000000 _call_desc(_0RL_lcfn_f894c8374a428e70_70000000, "connect_push_consumer", 22, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  
#ifndef _MSC_VER
  if (CosEventComm__impl_PushSupplier::_dispatch(_handle)) {
    return 1;
  }
#else
  // Work-around for incorrect MSVC code generation.
  if (((CosEventComm__impl_PushSupplier*)this)->
      CosEventComm__impl_PushSupplier::_dispatch(_handle)) {
    return 1;
  }
#endif


  return 0;
}

void*
CosEventChannelAdmin::_impl_ProxyPushSupplier::_ptrToInterface(const char* id)
{
  if (id == ::CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId)
    return (::CosEventChannelAdmin::_impl_ProxyPushSupplier*) this;
  if (id == ::CosEventComm::PushSupplier::_PD_repoId)
    return (::CosEventComm::_impl_PushSupplier*) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId))
    return (::CosEventChannelAdmin::_impl_ProxyPushSupplier*) this;
  if (omni::strMatch(id, ::CosEventComm::PushSupplier::_PD_repoId))
    return (::CosEventComm::_impl_PushSupplier*) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosEventChannelAdmin::_impl_ProxyPushSupplier::_mostDerivedRepoId()
{
  return ::CosEventChannelAdmin::ProxyPushSupplier::_PD_repoId;
}

CosEventChannelAdmin::ConsumerAdmin_ptr CosEventChannelAdmin::ConsumerAdmin_Helper::_nil() {
  return ::CosEventChannelAdmin::ConsumerAdmin::_nil();
}

::CORBA::Boolean CosEventChannelAdmin::ConsumerAdmin_Helper::is_nil(::CosEventChannelAdmin::ConsumerAdmin_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosEventChannelAdmin::ConsumerAdmin_Helper::release(::CosEventChannelAdmin::ConsumerAdmin_ptr p) {
  ::CORBA::release(p);
}

void CosEventChannelAdmin::ConsumerAdmin_Helper::marshalObjRef(::CosEventChannelAdmin::ConsumerAdmin_ptr obj, cdrStream& s) {
  ::CosEventChannelAdmin::ConsumerAdmin::_marshalObjRef(obj, s);
}

CosEventChannelAdmin::ConsumerAdmin_ptr CosEventChannelAdmin::ConsumerAdmin_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosEventChannelAdmin::ConsumerAdmin::_unmarshalObjRef(s);
}

void CosEventChannelAdmin::ConsumerAdmin_Helper::duplicate(::CosEventChannelAdmin::ConsumerAdmin_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosEventChannelAdmin::ConsumerAdmin_ptr
CosEventChannelAdmin::ConsumerAdmin::_duplicate(::CosEventChannelAdmin::ConsumerAdmin_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosEventChannelAdmin::ConsumerAdmin_ptr
CosEventChannelAdmin::ConsumerAdmin::_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();
}


CosEventChannelAdmin::ConsumerAdmin_ptr
CosEventChannelAdmin::ConsumerAdmin::_unchecked_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()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosEventChannelAdmin::ConsumerAdmin_ptr
CosEventChannelAdmin::ConsumerAdmin::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_ConsumerAdmin _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_ConsumerAdmin* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_ConsumerAdmin;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosEventChannelAdmin::ConsumerAdmin::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0";


CosEventChannelAdmin::_objref_ConsumerAdmin::~_objref_ConsumerAdmin() {
  
}


CosEventChannelAdmin::_objref_ConsumerAdmin::_objref_ConsumerAdmin(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosEventChannelAdmin::ConsumerAdmin::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosEventChannelAdmin::_objref_ConsumerAdmin::_ptrToObjRef(const char* id)
{
  if (id == ::CosEventChannelAdmin::ConsumerAdmin::_PD_repoId)
    return (::CosEventChannelAdmin::ConsumerAdmin_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ConsumerAdmin::_PD_repoId))
    return (::CosEventChannelAdmin::ConsumerAdmin_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosEventChannelAdmin::ConsumerAdmin::obtain_push_supplier

// Proxy call descriptor class. Mangled signature:
//  _cCosEventChannelAdmin_mProxyPushSupplier
class _0RL_cd_f894c8374a428e70_80000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_80000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosEventChannelAdmin::ProxyPushSupplier_var result;
};

void _0RL_cd_f894c8374a428e70_80000000::marshalReturnedValues(cdrStream& _n)
{
  CosEventChannelAdmin::ProxyPushSupplier::_marshalObjRef(result,_n);

}

void _0RL_cd_f894c8374a428e70_80000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosEventChannelAdmin::ProxyPushSupplier::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_f894c8374a428e70_80000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_90000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_80000000* tcd = (_0RL_cd_f894c8374a428e70_80000000*)cd;
  CosEventChannelAdmin::_impl_ConsumerAdmin* impl = (CosEventChannelAdmin::_impl_ConsumerAdmin*) svnt->_ptrToInterface(CosEventChannelAdmin::ConsumerAdmin::_PD_repoId);
  tcd->result = impl->obtain_push_supplier();


}

CosEventChannelAdmin::ProxyPushSupplier_ptr CosEventChannelAdmin::_objref_ConsumerAdmin::obtain_push_supplier()
{
  _0RL_cd_f894c8374a428e70_80000000 _call_desc(_0RL_lcfn_f894c8374a428e70_90000000, "obtain_push_supplier", 21);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosEventChannelAdmin::ConsumerAdmin::obtain_pull_supplier

// Proxy call descriptor class. Mangled signature:
//  _cCosEventChannelAdmin_mProxyPullSupplier
class _0RL_cd_f894c8374a428e70_a0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_a0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosEventChannelAdmin::ProxyPullSupplier_var result;
};

void _0RL_cd_f894c8374a428e70_a0000000::marshalReturnedValues(cdrStream& _n)
{
  CosEventChannelAdmin::ProxyPullSupplier::_marshalObjRef(result,_n);

}

void _0RL_cd_f894c8374a428e70_a0000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosEventChannelAdmin::ProxyPullSupplier::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_f894c8374a428e70_a0000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_b0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_a0000000* tcd = (_0RL_cd_f894c8374a428e70_a0000000*)cd;
  CosEventChannelAdmin::_impl_ConsumerAdmin* impl = (CosEventChannelAdmin::_impl_ConsumerAdmin*) svnt->_ptrToInterface(CosEventChannelAdmin::ConsumerAdmin::_PD_repoId);
  tcd->result = impl->obtain_pull_supplier();


}

CosEventChannelAdmin::ProxyPullSupplier_ptr CosEventChannelAdmin::_objref_ConsumerAdmin::obtain_pull_supplier()
{
  _0RL_cd_f894c8374a428e70_a0000000 _call_desc(_0RL_lcfn_f894c8374a428e70_b0000000, "obtain_pull_supplier", 21);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}

CosEventChannelAdmin::_pof_ConsumerAdmin::~_pof_ConsumerAdmin() {}


omniObjRef*
CosEventChannelAdmin::_pof_ConsumerAdmin::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosEventChannelAdmin::_objref_ConsumerAdmin(ior, id);
}


::CORBA::Boolean
CosEventChannelAdmin::_pof_ConsumerAdmin::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosEventChannelAdmin::ConsumerAdmin::_PD_repoId))
    return 1;
  
  return 0;
}

const CosEventChannelAdmin::_pof_ConsumerAdmin _the_pof_CosEventChannelAdmin_mConsumerAdmin;

CosEventChannelAdmin::_impl_ConsumerAdmin::~_impl_ConsumerAdmin() {}


::CORBA::Boolean
CosEventChannelAdmin::_impl_ConsumerAdmin::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "obtain_push_supplier")) {

    _0RL_cd_f894c8374a428e70_80000000 _call_desc(_0RL_lcfn_f894c8374a428e70_90000000, "obtain_push_supplier", 21, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "obtain_pull_supplier")) {

    _0RL_cd_f894c8374a428e70_a0000000 _call_desc(_0RL_lcfn_f894c8374a428e70_b0000000, "obtain_pull_supplier", 21, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosEventChannelAdmin::_impl_ConsumerAdmin::_ptrToInterface(const char* id)
{
  if (id == ::CosEventChannelAdmin::ConsumerAdmin::_PD_repoId)
    return (::CosEventChannelAdmin::_impl_ConsumerAdmin*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosEventChannelAdmin::ConsumerAdmin::_PD_repoId))
    return (::CosEventChannelAdmin::_impl_ConsumerAdmin*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosEventChannelAdmin::_impl_ConsumerAdmin::_mostDerivedRepoId()
{
  return ::CosEventChannelAdmin::ConsumerAdmin::_PD_repoId;
}

CosEventChannelAdmin::SupplierAdmin_ptr CosEventChannelAdmin::SupplierAdmin_Helper::_nil() {
  return ::CosEventChannelAdmin::SupplierAdmin::_nil();
}

::CORBA::Boolean CosEventChannelAdmin::SupplierAdmin_Helper::is_nil(::CosEventChannelAdmin::SupplierAdmin_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosEventChannelAdmin::SupplierAdmin_Helper::release(::CosEventChannelAdmin::SupplierAdmin_ptr p) {
  ::CORBA::release(p);
}

void CosEventChannelAdmin::SupplierAdmin_Helper::marshalObjRef(::CosEventChannelAdmin::SupplierAdmin_ptr obj, cdrStream& s) {
  ::CosEventChannelAdmin::SupplierAdmin::_marshalObjRef(obj, s);
}

CosEventChannelAdmin::SupplierAdmin_ptr CosEventChannelAdmin::SupplierAdmin_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosEventChannelAdmin::SupplierAdmin::_unmarshalObjRef(s);
}

void CosEventChannelAdmin::SupplierAdmin_Helper::duplicate(::CosEventChannelAdmin::SupplierAdmin_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosEventChannelAdmin::SupplierAdmin_ptr
CosEventChannelAdmin::SupplierAdmin::_duplicate(::CosEventChannelAdmin::SupplierAdmin_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosEventChannelAdmin::SupplierAdmin_ptr
CosEventChannelAdmin::SupplierAdmin::_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();
}


CosEventChannelAdmin::SupplierAdmin_ptr
CosEventChannelAdmin::SupplierAdmin::_unchecked_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()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosEventChannelAdmin::SupplierAdmin_ptr
CosEventChannelAdmin::SupplierAdmin::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_SupplierAdmin _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_SupplierAdmin* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_SupplierAdmin;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosEventChannelAdmin::SupplierAdmin::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0";


CosEventChannelAdmin::_objref_SupplierAdmin::~_objref_SupplierAdmin() {
  
}


CosEventChannelAdmin::_objref_SupplierAdmin::_objref_SupplierAdmin(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosEventChannelAdmin::SupplierAdmin::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosEventChannelAdmin::_objref_SupplierAdmin::_ptrToObjRef(const char* id)
{
  if (id == ::CosEventChannelAdmin::SupplierAdmin::_PD_repoId)
    return (::CosEventChannelAdmin::SupplierAdmin_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosEventChannelAdmin::SupplierAdmin::_PD_repoId))
    return (::CosEventChannelAdmin::SupplierAdmin_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosEventChannelAdmin::SupplierAdmin::obtain_push_consumer

// Proxy call descriptor class. Mangled signature:
//  _cCosEventChannelAdmin_mProxyPushConsumer
class _0RL_cd_f894c8374a428e70_c0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_c0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosEventChannelAdmin::ProxyPushConsumer_var result;
};

void _0RL_cd_f894c8374a428e70_c0000000::marshalReturnedValues(cdrStream& _n)
{
  CosEventChannelAdmin::ProxyPushConsumer::_marshalObjRef(result,_n);

}

void _0RL_cd_f894c8374a428e70_c0000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosEventChannelAdmin::ProxyPushConsumer::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_f894c8374a428e70_c0000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_d0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_c0000000* tcd = (_0RL_cd_f894c8374a428e70_c0000000*)cd;
  CosEventChannelAdmin::_impl_SupplierAdmin* impl = (CosEventChannelAdmin::_impl_SupplierAdmin*) svnt->_ptrToInterface(CosEventChannelAdmin::SupplierAdmin::_PD_repoId);
  tcd->result = impl->obtain_push_consumer();


}

CosEventChannelAdmin::ProxyPushConsumer_ptr CosEventChannelAdmin::_objref_SupplierAdmin::obtain_push_consumer()
{
  _0RL_cd_f894c8374a428e70_c0000000 _call_desc(_0RL_lcfn_f894c8374a428e70_d0000000, "obtain_push_consumer", 21);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosEventChannelAdmin::SupplierAdmin::obtain_pull_consumer

// Proxy call descriptor class. Mangled signature:
//  _cCosEventChannelAdmin_mProxyPullConsumer
class _0RL_cd_f894c8374a428e70_e0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_e0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosEventChannelAdmin::ProxyPullConsumer_var result;
};

void _0RL_cd_f894c8374a428e70_e0000000::marshalReturnedValues(cdrStream& _n)
{
  CosEventChannelAdmin::ProxyPullConsumer::_marshalObjRef(result,_n);

}

void _0RL_cd_f894c8374a428e70_e0000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosEventChannelAdmin::ProxyPullConsumer::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_f894c8374a428e70_e0000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_f0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_e0000000* tcd = (_0RL_cd_f894c8374a428e70_e0000000*)cd;
  CosEventChannelAdmin::_impl_SupplierAdmin* impl = (CosEventChannelAdmin::_impl_SupplierAdmin*) svnt->_ptrToInterface(CosEventChannelAdmin::SupplierAdmin::_PD_repoId);
  tcd->result = impl->obtain_pull_consumer();


}

CosEventChannelAdmin::ProxyPullConsumer_ptr CosEventChannelAdmin::_objref_SupplierAdmin::obtain_pull_consumer()
{
  _0RL_cd_f894c8374a428e70_e0000000 _call_desc(_0RL_lcfn_f894c8374a428e70_f0000000, "obtain_pull_consumer", 21);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}

CosEventChannelAdmin::_pof_SupplierAdmin::~_pof_SupplierAdmin() {}


omniObjRef*
CosEventChannelAdmin::_pof_SupplierAdmin::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosEventChannelAdmin::_objref_SupplierAdmin(ior, id);
}


::CORBA::Boolean
CosEventChannelAdmin::_pof_SupplierAdmin::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosEventChannelAdmin::SupplierAdmin::_PD_repoId))
    return 1;
  
  return 0;
}

const CosEventChannelAdmin::_pof_SupplierAdmin _the_pof_CosEventChannelAdmin_mSupplierAdmin;

CosEventChannelAdmin::_impl_SupplierAdmin::~_impl_SupplierAdmin() {}


::CORBA::Boolean
CosEventChannelAdmin::_impl_SupplierAdmin::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "obtain_push_consumer")) {

    _0RL_cd_f894c8374a428e70_c0000000 _call_desc(_0RL_lcfn_f894c8374a428e70_d0000000, "obtain_push_consumer", 21, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "obtain_pull_consumer")) {

    _0RL_cd_f894c8374a428e70_e0000000 _call_desc(_0RL_lcfn_f894c8374a428e70_f0000000, "obtain_pull_consumer", 21, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosEventChannelAdmin::_impl_SupplierAdmin::_ptrToInterface(const char* id)
{
  if (id == ::CosEventChannelAdmin::SupplierAdmin::_PD_repoId)
    return (::CosEventChannelAdmin::_impl_SupplierAdmin*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosEventChannelAdmin::SupplierAdmin::_PD_repoId))
    return (::CosEventChannelAdmin::_impl_SupplierAdmin*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosEventChannelAdmin::_impl_SupplierAdmin::_mostDerivedRepoId()
{
  return ::CosEventChannelAdmin::SupplierAdmin::_PD_repoId;
}

CosEventChannelAdmin::EventChannel_ptr CosEventChannelAdmin::EventChannel_Helper::_nil() {
  return ::CosEventChannelAdmin::EventChannel::_nil();
}

::CORBA::Boolean CosEventChannelAdmin::EventChannel_Helper::is_nil(::CosEventChannelAdmin::EventChannel_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosEventChannelAdmin::EventChannel_Helper::release(::CosEventChannelAdmin::EventChannel_ptr p) {
  ::CORBA::release(p);
}

void CosEventChannelAdmin::EventChannel_Helper::marshalObjRef(::CosEventChannelAdmin::EventChannel_ptr obj, cdrStream& s) {
  ::CosEventChannelAdmin::EventChannel::_marshalObjRef(obj, s);
}

CosEventChannelAdmin::EventChannel_ptr CosEventChannelAdmin::EventChannel_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosEventChannelAdmin::EventChannel::_unmarshalObjRef(s);
}

void CosEventChannelAdmin::EventChannel_Helper::duplicate(::CosEventChannelAdmin::EventChannel_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosEventChannelAdmin::EventChannel_ptr
CosEventChannelAdmin::EventChannel::_duplicate(::CosEventChannelAdmin::EventChannel_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosEventChannelAdmin::EventChannel_ptr
CosEventChannelAdmin::EventChannel::_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();
}


CosEventChannelAdmin::EventChannel_ptr
CosEventChannelAdmin::EventChannel::_unchecked_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()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosEventChannelAdmin::EventChannel_ptr
CosEventChannelAdmin::EventChannel::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_EventChannel _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_EventChannel* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_EventChannel;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosEventChannelAdmin::EventChannel::_PD_repoId = "IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0";


CosEventChannelAdmin::_objref_EventChannel::~_objref_EventChannel() {
  
}


CosEventChannelAdmin::_objref_EventChannel::_objref_EventChannel(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosEventChannelAdmin::EventChannel::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosEventChannelAdmin::_objref_EventChannel::_ptrToObjRef(const char* id)
{
  if (id == ::CosEventChannelAdmin::EventChannel::_PD_repoId)
    return (::CosEventChannelAdmin::EventChannel_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosEventChannelAdmin::EventChannel::_PD_repoId))
    return (::CosEventChannelAdmin::EventChannel_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosEventChannelAdmin::EventChannel::for_consumers

// Proxy call descriptor class. Mangled signature:
//  _cCosEventChannelAdmin_mConsumerAdmin
class _0RL_cd_f894c8374a428e70_01000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_01000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosEventChannelAdmin::ConsumerAdmin_var result;
};

void _0RL_cd_f894c8374a428e70_01000000::marshalReturnedValues(cdrStream& _n)
{
  CosEventChannelAdmin::ConsumerAdmin::_marshalObjRef(result,_n);

}

void _0RL_cd_f894c8374a428e70_01000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosEventChannelAdmin::ConsumerAdmin::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_f894c8374a428e70_01000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_11000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_01000000* tcd = (_0RL_cd_f894c8374a428e70_01000000*)cd;
  CosEventChannelAdmin::_impl_EventChannel* impl = (CosEventChannelAdmin::_impl_EventChannel*) svnt->_ptrToInterface(CosEventChannelAdmin::EventChannel::_PD_repoId);
  tcd->result = impl->for_consumers();


}

CosEventChannelAdmin::ConsumerAdmin_ptr CosEventChannelAdmin::_objref_EventChannel::for_consumers()
{
  _0RL_cd_f894c8374a428e70_01000000 _call_desc(_0RL_lcfn_f894c8374a428e70_11000000, "for_consumers", 14);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosEventChannelAdmin::EventChannel::for_suppliers

// Proxy call descriptor class. Mangled signature:
//  _cCosEventChannelAdmin_mSupplierAdmin
class _0RL_cd_f894c8374a428e70_21000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_21000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosEventChannelAdmin::SupplierAdmin_var result;
};

void _0RL_cd_f894c8374a428e70_21000000::marshalReturnedValues(cdrStream& _n)
{
  CosEventChannelAdmin::SupplierAdmin::_marshalObjRef(result,_n);

}

void _0RL_cd_f894c8374a428e70_21000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosEventChannelAdmin::SupplierAdmin::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_f894c8374a428e70_21000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_31000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_f894c8374a428e70_21000000* tcd = (_0RL_cd_f894c8374a428e70_21000000*)cd;
  CosEventChannelAdmin::_impl_EventChannel* impl = (CosEventChannelAdmin::_impl_EventChannel*) svnt->_ptrToInterface(CosEventChannelAdmin::EventChannel::_PD_repoId);
  tcd->result = impl->for_suppliers();


}

CosEventChannelAdmin::SupplierAdmin_ptr CosEventChannelAdmin::_objref_EventChannel::for_suppliers()
{
  _0RL_cd_f894c8374a428e70_21000000 _call_desc(_0RL_lcfn_f894c8374a428e70_31000000, "for_suppliers", 14);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosEventChannelAdmin::EventChannel::destroy

// Proxy call descriptor class. Mangled signature:
//  void
class _0RL_cd_f894c8374a428e70_41000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_f894c8374a428e70_41000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
    
  
  static const char* const _user_exns[];

  
};

const char* const _0RL_cd_f894c8374a428e70_41000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_f894c8374a428e70_51000000(omniCallDescriptor*, omniServant* svnt)
{
  
  CosEventChannelAdmin::_impl_EventChannel* impl = (CosEventChannelAdmin::_impl_EventChannel*) svnt->_ptrToInterface(CosEventChannelAdmin::EventChannel::_PD_repoId);
  impl->destroy();


}

void CosEventChannelAdmin::_objref_EventChannel::destroy()
{
  _0RL_cd_f894c8374a428e70_41000000 _call_desc(_0RL_lcfn_f894c8374a428e70_51000000, "destroy", 8);


  _invoke(_call_desc);



}

CosEventChannelAdmin::_pof_EventChannel::~_pof_EventChannel() {}


omniObjRef*
CosEventChannelAdmin::_pof_EventChannel::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosEventChannelAdmin::_objref_EventChannel(ior, id);
}


::CORBA::Boolean
CosEventChannelAdmin::_pof_EventChannel::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosEventChannelAdmin::EventChannel::_PD_repoId))
    return 1;
  
  return 0;
}

const CosEventChannelAdmin::_pof_EventChannel _the_pof_CosEventChannelAdmin_mEventChannel;

CosEventChannelAdmin::_impl_EventChannel::~_impl_EventChannel() {}


::CORBA::Boolean
CosEventChannelAdmin::_impl_EventChannel::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "for_consumers")) {

    _0RL_cd_f894c8374a428e70_01000000 _call_desc(_0RL_lcfn_f894c8374a428e70_11000000, "for_consumers", 14, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "for_suppliers")) {

    _0RL_cd_f894c8374a428e70_21000000 _call_desc(_0RL_lcfn_f894c8374a428e70_31000000, "for_suppliers", 14, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "destroy")) {

    _0RL_cd_f894c8374a428e70_41000000 _call_desc(_0RL_lcfn_f894c8374a428e70_51000000, "destroy", 8, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosEventChannelAdmin::_impl_EventChannel::_ptrToInterface(const char* id)
{
  if (id == ::CosEventChannelAdmin::EventChannel::_PD_repoId)
    return (::CosEventChannelAdmin::_impl_EventChannel*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosEventChannelAdmin::EventChannel::_PD_repoId))
    return (::CosEventChannelAdmin::_impl_EventChannel*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosEventChannelAdmin::_impl_EventChannel::_mostDerivedRepoId()
{
  return ::CosEventChannelAdmin::EventChannel::_PD_repoId;
}

POA_CosEventChannelAdmin::ProxyPushConsumer::~ProxyPushConsumer() {}

POA_CosEventChannelAdmin::ProxyPullSupplier::~ProxyPullSupplier() {}

POA_CosEventChannelAdmin::ProxyPullConsumer::~ProxyPullConsumer() {}

POA_CosEventChannelAdmin::ProxyPushSupplier::~ProxyPushSupplier() {}

POA_CosEventChannelAdmin::ConsumerAdmin::~ConsumerAdmin() {}

POA_CosEventChannelAdmin::SupplierAdmin::~SupplierAdmin() {}

POA_CosEventChannelAdmin::EventChannel::~EventChannel() {}

