/* -*- C++ -*- $Id$ */

// ******  Code generated by the The ACE ORB (TAO) IDL Compiler *******
// TAO and the TAO IDL Compiler have been developed by the Center for
// Distributed Object Computing at Washington University, St. Louis.
//
// Information about TAO is available at:
//                 http://www.cs.wustl.edu/~schmidt/TAO.html

#include "CosEventCommC.h"

#if !defined (__ACE_INLINE__)
#include "CosEventCommC.i"
#endif /* !defined INLINE */

// default constructor
CosEventComm::Disconnected::Disconnected (void)
  : CORBA_UserException (::CosEventComm::_tc_Disconnected)
{
}

// destructor - all members are of self managing types
CosEventComm::Disconnected::~Disconnected (void)
{
}

// copy constructor
CosEventComm::Disconnected::Disconnected (const ::CosEventComm::Disconnected &_tao_excp)
  : CORBA_UserException (_tao_excp._type ())
{
  }

// assignment operator
CosEventComm::Disconnected&
CosEventComm::Disconnected::operator= (const ::CosEventComm::Disconnected &_tao_excp)
{

  this->CORBA_UserException::operator= (_tao_excp);
  return *this;
}

// narrow
CosEventComm::Disconnected_ptr 
CosEventComm::Disconnected::_narrow (CORBA::Exception *exc)
{
  if (!ACE_OS::strcmp ("IDL:omg.org/CosEventComm/Disconnected:1.0", exc->_id ())) // same type
    return ACE_dynamic_cast (Disconnected_ptr, exc);
  else
    return 0;
}


void CosEventComm::Disconnected::_raise ()
{
  TAO_RAISE(*this);
}


void CosEventComm::Disconnected::_tao_encode (
    TAO_OutputCDR &cdr,
    CORBA::Environment &ACE_TRY_ENV) const
{
  if (cdr << *this)
    return;
  ACE_THROW (CORBA::MARSHAL ());
}


void CosEventComm::Disconnected::_tao_decode (
    TAO_InputCDR &cdr,
    CORBA::Environment &ACE_TRY_ENV)
{
  if (cdr >> *this)
    return;
  ACE_THROW (CORBA::MARSHAL ());
}

// TAO extension - the _alloc method
CORBA::Exception *CosEventComm::Disconnected::_alloc (void)
{
  CORBA::Exception *retval = 0;
  ACE_NEW_RETURN (retval, ::CosEventComm::Disconnected, 0);
  return retval;
}

static const CORBA::Long _oc_CosEventComm_Disconnected[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  42, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x436f6d6d), ACE_NTOHL (0x2f446973), ACE_NTOHL (0x636f6e6e), ACE_NTOHL (0x65637465), ACE_NTOHL (0x643a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosEventComm/Disconnected:1.0
  13, ACE_NTOHL (0x44697363), ACE_NTOHL (0x6f6e6e65), ACE_NTOHL (0x63746564), ACE_NTOHL (0x0),  // name = Disconnected
  0, // member count
};
static CORBA::TypeCode _tc_TAO_tc_CosEventComm_Disconnected (CORBA::tk_except, sizeof (_oc_CosEventComm_Disconnected), (char *) &_oc_CosEventComm_Disconnected, 0, sizeof (CosEventComm::Disconnected));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventComm)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Disconnected, &_tc_TAO_tc_CosEventComm_Disconnected)
TAO_NAMESPACE_END
CosEventComm::PushConsumer_ptr CosEventComm::PushConsumer::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return PushConsumer::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventComm/PushConsumer:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (PushConsumer::_nil ());
  if (is_a == 0)
    return PushConsumer::_nil ();
  return PushConsumer::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventComm::PushConsumer_ptr CosEventComm::PushConsumer::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return PushConsumer::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  PushConsumer_ptr default_proxy = PushConsumer::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventComm_PushConsumer_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventComm_PushConsumer_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, PushConsumer (stub), PushConsumer::_nil ());
  return TAO_CosEventComm_PushConsumer_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventComm::PushConsumer_ptr 
CosEventComm::PushConsumer::_duplicate (PushConsumer_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

void CosEventComm::PushConsumer::push (
    const CORBA::Any & data,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventComm::Disconnected
  ))
{
  
  static TAO_Exception_Data _tao_CosEventComm_PushConsumer_push_exceptiondata [] = 
  {
    {CosEventComm::_tc_Disconnected, CosEventComm::Disconnected::_alloc}
  };


  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "push",
      4,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "push",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
        if (!(
              (_tao_out << data)
          ))
          TAO_INTERCEPTOR_THROW (CORBA::MARSHAL ());
        int _invoke_status =
          _tao_call.invoke (_tao_CosEventComm_PushConsumer_push_exceptiondata, 1, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "push",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "push",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

void CosEventComm::PushConsumer::disconnect_push_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  

  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "disconnect_push_consumer",
      24,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_push_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_push_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "disconnect_push_consumer",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventComm::PushConsumer::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PushConsumer:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventComm::PushConsumer::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventComm/PushConsumer:1.0";
}

CosEventComm::TAO_CosEventComm_PushConsumer_Default_Proxy_Factory::TAO_CosEventComm_PushConsumer_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventComm_PushConsumer_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventComm::TAO_CosEventComm_PushConsumer_Default_Proxy_Factory::~TAO_CosEventComm_PushConsumer_Default_Proxy_Factory (void)
{
}

CosEventComm::PushConsumer_ptr
CosEventComm::TAO_CosEventComm_PushConsumer_Default_Proxy_Factory::create_proxy (
    ::CosEventComm::PushConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventComm::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventComm::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter::~TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventComm::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventComm_PushConsumer_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventComm::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventComm::PushConsumer_ptr
CosEventComm::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter::create_proxy (
    ::CosEventComm::PushConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventComm_PushConsumer_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventComm::TAO_CosEventComm_PushConsumer_Smart_Proxy_Base::TAO_CosEventComm_PushConsumer_Smart_Proxy_Base (::CosEventComm::PushConsumer_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventComm::TAO_CosEventComm_PushConsumer_Smart_Proxy_Base::~TAO_CosEventComm_PushConsumer_Smart_Proxy_Base (void)
{
}

void CosEventComm::TAO_CosEventComm_PushConsumer_Smart_Proxy_Base::push  (
    const CORBA::Any & data,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventComm::Disconnected
  ))
{
  this->base_proxy_->push (
      data,
      ACE_TRY_ENV
    );

}

void CosEventComm::TAO_CosEventComm_PushConsumer_Smart_Proxy_Base::disconnect_push_consumer  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  this->base_proxy_->disconnect_push_consumer (
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventComm::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventComm::TAO_CosEventComm_PushConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventComm_PushConsumer[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  42, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x436f6d6d), ACE_NTOHL (0x2f507573), ACE_NTOHL (0x68436f6e), ACE_NTOHL (0x73756d65), ACE_NTOHL (0x723a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosEventComm/PushConsumer:1.0
  13, ACE_NTOHL (0x50757368), ACE_NTOHL (0x436f6e73), ACE_NTOHL (0x756d6572), ACE_NTOHL (0x0),  // name = PushConsumer
};
static CORBA::TypeCode _tc_TAO_tc_CosEventComm_PushConsumer (CORBA::tk_objref, sizeof (_oc_CosEventComm_PushConsumer), (char *) &_oc_CosEventComm_PushConsumer, 0, sizeof (CosEventComm::PushConsumer));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventComm)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PushConsumer, &_tc_TAO_tc_CosEventComm_PushConsumer)
TAO_NAMESPACE_END
CosEventComm::PushSupplier_ptr CosEventComm::PushSupplier::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return PushSupplier::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventComm/PushSupplier:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (PushSupplier::_nil ());
  if (is_a == 0)
    return PushSupplier::_nil ();
  return PushSupplier::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventComm::PushSupplier_ptr CosEventComm::PushSupplier::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return PushSupplier::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  PushSupplier_ptr default_proxy = PushSupplier::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventComm_PushSupplier_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventComm_PushSupplier_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, PushSupplier (stub), PushSupplier::_nil ());
  return TAO_CosEventComm_PushSupplier_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventComm::PushSupplier_ptr 
CosEventComm::PushSupplier::_duplicate (PushSupplier_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

void CosEventComm::PushSupplier::disconnect_push_supplier (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  

  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "disconnect_push_supplier",
      24,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_push_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_push_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "disconnect_push_supplier",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventComm::PushSupplier::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PushSupplier:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventComm::PushSupplier::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventComm/PushSupplier:1.0";
}

CosEventComm::TAO_CosEventComm_PushSupplier_Default_Proxy_Factory::TAO_CosEventComm_PushSupplier_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventComm_PushSupplier_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventComm::TAO_CosEventComm_PushSupplier_Default_Proxy_Factory::~TAO_CosEventComm_PushSupplier_Default_Proxy_Factory (void)
{
}

CosEventComm::PushSupplier_ptr
CosEventComm::TAO_CosEventComm_PushSupplier_Default_Proxy_Factory::create_proxy (
    ::CosEventComm::PushSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventComm::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventComm::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter::~TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventComm::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventComm_PushSupplier_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventComm::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventComm::PushSupplier_ptr
CosEventComm::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter::create_proxy (
    ::CosEventComm::PushSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventComm_PushSupplier_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventComm::TAO_CosEventComm_PushSupplier_Smart_Proxy_Base::TAO_CosEventComm_PushSupplier_Smart_Proxy_Base (::CosEventComm::PushSupplier_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventComm::TAO_CosEventComm_PushSupplier_Smart_Proxy_Base::~TAO_CosEventComm_PushSupplier_Smart_Proxy_Base (void)
{
}

void CosEventComm::TAO_CosEventComm_PushSupplier_Smart_Proxy_Base::disconnect_push_supplier  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  this->base_proxy_->disconnect_push_supplier (
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventComm::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventComm::TAO_CosEventComm_PushSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventComm_PushSupplier[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  42, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x436f6d6d), ACE_NTOHL (0x2f507573), ACE_NTOHL (0x68537570), ACE_NTOHL (0x706c6965), ACE_NTOHL (0x723a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosEventComm/PushSupplier:1.0
  13, ACE_NTOHL (0x50757368), ACE_NTOHL (0x53757070), ACE_NTOHL (0x6c696572), ACE_NTOHL (0x0),  // name = PushSupplier
};
static CORBA::TypeCode _tc_TAO_tc_CosEventComm_PushSupplier (CORBA::tk_objref, sizeof (_oc_CosEventComm_PushSupplier), (char *) &_oc_CosEventComm_PushSupplier, 0, sizeof (CosEventComm::PushSupplier));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventComm)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PushSupplier, &_tc_TAO_tc_CosEventComm_PushSupplier)
TAO_NAMESPACE_END
CosEventComm::PullSupplier_ptr CosEventComm::PullSupplier::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return PullSupplier::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventComm/PullSupplier:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (PullSupplier::_nil ());
  if (is_a == 0)
    return PullSupplier::_nil ();
  return PullSupplier::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventComm::PullSupplier_ptr CosEventComm::PullSupplier::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return PullSupplier::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  PullSupplier_ptr default_proxy = PullSupplier::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventComm_PullSupplier_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventComm_PullSupplier_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, PullSupplier (stub), PullSupplier::_nil ());
  return TAO_CosEventComm_PullSupplier_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventComm::PullSupplier_ptr 
CosEventComm::PullSupplier::_duplicate (PullSupplier_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

CORBA::Any * CosEventComm::PullSupplier::pull (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventComm::Disconnected
  ))
{
  
  static TAO_Exception_Data _tao_CosEventComm_PullSupplier_pull_exceptiondata [] = 
  {
    {CosEventComm::_tc_Disconnected, CosEventComm::Disconnected::_alloc}
  };

  CORBA::Any *_tao_retval = 0;
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  ACE_NEW_RETURN (_tao_retval, CORBA::Any, _tao_retval);
  CORBA::Any_var _tao_safe_retval (_tao_retval);
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "pull",
      4,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "pull",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (_tao_CosEventComm_PullSupplier_pull_exceptiondata, 1, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ())
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "pull",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "pull",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

CORBA::Any * CosEventComm::PullSupplier::try_pull (
    CORBA::Boolean_out has_event,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventComm::Disconnected
  ))
{
  
  static TAO_Exception_Data _tao_CosEventComm_PullSupplier_try_pull_exceptiondata [] = 
  {
    {CosEventComm::_tc_Disconnected, CosEventComm::Disconnected::_alloc}
  };

  CORBA::Any *_tao_retval = 0;
  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW_RETURN (CORBA::INTERNAL (), 0);

  
  ACE_NEW_RETURN (_tao_retval, CORBA::Any, _tao_retval);
  CORBA::Any_var _tao_safe_retval (_tao_retval);
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "try_pull",
      8,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK_RETURN (0);
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK_RETURN (0);
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "try_pull",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK_RETURN (0);

        int _invoke_status =
          _tao_call.invoke (_tao_CosEventComm_PullSupplier_try_pull_exceptiondata, 1, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK_RETURN (0);

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        }
        TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
        if (!(
              (_tao_in >> _tao_safe_retval.inout ()) &&
              (_tao_in >> CORBA::Any::to_boolean (has_event))
          ))
          TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);

        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "try_pull",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK_RETURN (0);
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "try_pull",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK_RETURN (0);
#endif /* TAO_HAS_INTERCEPTORS */
  return _tao_safe_retval._retn ();
}

void CosEventComm::PullSupplier::disconnect_pull_supplier (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  

  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "disconnect_pull_supplier",
      24,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_pull_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_pull_supplier",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "disconnect_pull_supplier",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventComm::PullSupplier::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PullSupplier:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventComm::PullSupplier::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventComm/PullSupplier:1.0";
}

CosEventComm::TAO_CosEventComm_PullSupplier_Default_Proxy_Factory::TAO_CosEventComm_PullSupplier_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventComm_PullSupplier_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventComm::TAO_CosEventComm_PullSupplier_Default_Proxy_Factory::~TAO_CosEventComm_PullSupplier_Default_Proxy_Factory (void)
{
}

CosEventComm::PullSupplier_ptr
CosEventComm::TAO_CosEventComm_PullSupplier_Default_Proxy_Factory::create_proxy (
    ::CosEventComm::PullSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventComm::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventComm::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter::~TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventComm::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventComm_PullSupplier_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventComm::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventComm::PullSupplier_ptr
CosEventComm::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter::create_proxy (
    ::CosEventComm::PullSupplier_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventComm_PullSupplier_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventComm::TAO_CosEventComm_PullSupplier_Smart_Proxy_Base::TAO_CosEventComm_PullSupplier_Smart_Proxy_Base (::CosEventComm::PullSupplier_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventComm::TAO_CosEventComm_PullSupplier_Smart_Proxy_Base::~TAO_CosEventComm_PullSupplier_Smart_Proxy_Base (void)
{
}

CORBA::Any * CosEventComm::TAO_CosEventComm_PullSupplier_Smart_Proxy_Base::pull  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventComm::Disconnected
  ))
{
  return this->base_proxy_->pull (
      ACE_TRY_ENV
    );

}

CORBA::Any * CosEventComm::TAO_CosEventComm_PullSupplier_Smart_Proxy_Base::try_pull  (
    CORBA::Boolean_out has_event,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosEventComm::Disconnected
  ))
{
  return this->base_proxy_->try_pull (
      has_event,
      ACE_TRY_ENV
    );

}

void CosEventComm::TAO_CosEventComm_PullSupplier_Smart_Proxy_Base::disconnect_pull_supplier  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  this->base_proxy_->disconnect_pull_supplier (
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventComm::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventComm::TAO_CosEventComm_PullSupplier_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventComm_PullSupplier[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  42, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x436f6d6d), ACE_NTOHL (0x2f50756c), ACE_NTOHL (0x6c537570), ACE_NTOHL (0x706c6965), ACE_NTOHL (0x723a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosEventComm/PullSupplier:1.0
  13, ACE_NTOHL (0x50756c6c), ACE_NTOHL (0x53757070), ACE_NTOHL (0x6c696572), ACE_NTOHL (0x0),  // name = PullSupplier
};
static CORBA::TypeCode _tc_TAO_tc_CosEventComm_PullSupplier (CORBA::tk_objref, sizeof (_oc_CosEventComm_PullSupplier), (char *) &_oc_CosEventComm_PullSupplier, 0, sizeof (CosEventComm::PullSupplier));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventComm)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PullSupplier, &_tc_TAO_tc_CosEventComm_PullSupplier)
TAO_NAMESPACE_END
CosEventComm::PullConsumer_ptr CosEventComm::PullConsumer::_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &ACE_TRY_ENV
  )
{
  if (CORBA::is_nil (obj))
    return PullConsumer::_nil ();
  CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CosEventComm/PullConsumer:1.0", ACE_TRY_ENV);
  ACE_CHECK_RETURN (PullConsumer::_nil ());
  if (is_a == 0)
    return PullConsumer::_nil ();
  return PullConsumer::_unchecked_narrow (obj, ACE_TRY_ENV);
}

CosEventComm::PullConsumer_ptr CosEventComm::PullConsumer::_unchecked_narrow (
    CORBA::Object_ptr obj,
    CORBA::Environment &
  )
{
  if (CORBA::is_nil (obj))
    return PullConsumer::_nil ();
  TAO_Stub* stub = obj->_stubobj ();
  stub->_incr_refcnt ();
  PullConsumer_ptr default_proxy = PullConsumer::_nil ();
  if (obj->_is_collocated () && _TAO_collocation_CosEventComm_PullConsumer_Stub_Factory_function_pointer != 0)
    {
      default_proxy = _TAO_collocation_CosEventComm_PullConsumer_Stub_Factory_function_pointer (obj);
    }
  if (CORBA::is_nil (default_proxy))
    ACE_NEW_RETURN (default_proxy, PullConsumer (stub), PullConsumer::_nil ());
  return TAO_CosEventComm_PullConsumer_PROXY_FACTORY_ADAPTER::instance ()->create_proxy (default_proxy);
}

CosEventComm::PullConsumer_ptr 
CosEventComm::PullConsumer::_duplicate (PullConsumer_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_incr_refcnt ();
  return obj;
}

void CosEventComm::PullConsumer::disconnect_pull_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  

  
  
  TAO_Stub *istub = this->_stubobj ();
  if (istub == 0)
    ACE_THROW (CORBA::INTERNAL ());

  
  TAO_GIOP_Twoway_Invocation _tao_call (
      istub,
      "disconnect_pull_consumer",
      24,
      istub->orb_core ()
    );

#if defined (TAO_HAS_INTERCEPTORS)
    TAO_ClientRequestInterceptor_Adapter
      _tao_vfr (istub->orb_core ()->orb ()->_get_client_interceptor (ACE_TRY_ENV));
    ACE_CHECK;
    PortableInterceptor::Cookies _tao_cookies;
    CORBA::NVList_var _tao_interceptor_args;
    if (_tao_vfr.valid ())
      {
        istub->orb_core ()->orb ()->create_list (0, _tao_interceptor_args.inout (), ACE_TRY_ENV);
        ACE_CHECK;
      }

    ACE_TRY
      {
#endif /* TAO_HAS_INTERCEPTORS */

      for (;;)
      {
        _tao_call.start (ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        TAO_INTERCEPTOR (
            _tao_vfr.preinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_pull_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        CORBA::Short flag = 131;
        // Tremporary hack until GIOP 1.2 is implemented.
        
        _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag), ACE_TRY_ENV);
        TAO_INTERCEPTOR_CHECK;

        int _invoke_status =
          _tao_call.invoke (0, 0, ACE_TRY_ENV);
                TAO_INTERCEPTOR_CHECK;

        if (_invoke_status == TAO_INVOKE_RESTART)
          continue;
        if (_invoke_status != TAO_INVOKE_OK)
        {
          TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES));
        }
        
        TAO_INTERCEPTOR (
            _tao_vfr.postinvoke (
                _tao_call.request_id (),
                1,
                this,
                "disconnect_pull_consumer",
                _tao_call.service_info (),
                _tao_interceptor_args.inout (),
                _tao_cookies,
                ACE_TRY_ENV
              )
          );
        TAO_INTERCEPTOR_CHECK;
        break;
        
      }
#if defined (TAO_HAS_INTERCEPTORS)
      
    }
  ACE_CATCHANY
    {
      _tao_vfr.exception_occurred (
          _tao_call.request_id (),
          1,
          this,
          "disconnect_pull_consumer",
          _tao_cookies,
          ACE_TRY_ENV
        );
      ACE_RETHROW;
    }
  ACE_ENDTRY;
  ACE_CHECK;
#endif /* TAO_HAS_INTERCEPTORS */

}

CORBA::Boolean CosEventComm::PullConsumer::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
  if (
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CosEventComm/PullConsumer:1.0")) ||
    (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
  return 1; // success using local knowledge
  else
    return this->CORBA_Object::_is_a (value, ACE_TRY_ENV);
}

const char* CosEventComm::PullConsumer::_interface_repository_id (void) const
{
  return "IDL:omg.org/CosEventComm/PullConsumer:1.0";
}

CosEventComm::TAO_CosEventComm_PullConsumer_Default_Proxy_Factory::TAO_CosEventComm_PullConsumer_Default_Proxy_Factory (int register_proxy_factory)
{
  if (register_proxy_factory)
    {
      TAO_CosEventComm_PullConsumer_PROXY_FACTORY_ADAPTER::instance ()->register_proxy_factory (this);
    }
}

CosEventComm::TAO_CosEventComm_PullConsumer_Default_Proxy_Factory::~TAO_CosEventComm_PullConsumer_Default_Proxy_Factory (void)
{
}

CosEventComm::PullConsumer_ptr
CosEventComm::TAO_CosEventComm_PullConsumer_Default_Proxy_Factory::create_proxy (
    ::CosEventComm::PullConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  return proxy;
}

CosEventComm::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter (void)
   : proxy_factory_ (0),
     delete_proxy_factory_ (0)
{
}

CosEventComm::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter::~TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter (void)
{
  // Making sure the factory which the adapter has is destroyed with it.
  if (this->proxy_factory_ != 0)
    delete this->proxy_factory_;
}

int
CosEventComm::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter::register_proxy_factory (
  TAO_CosEventComm_PullConsumer_Default_Proxy_Factory *df,
     CORBA::Environment &ACE_TRY_ENV
      )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Remove any existing <proxy_factory_> and replace with the new one.
  this->unregister_proxy_factory (ACE_TRY_ENV);
  this->proxy_factory_ = df;
  this->delete_proxy_factory_ = 0;
return 0;
}

int
CosEventComm::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter::unregister_proxy_factory (
  CORBA::Environment &
    )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  if (this->delete_proxy_factory_ == 0 && this->proxy_factory_ != 0)
    {
      // Its necessary to set <delete_proxy_factory_> to 1 to make sure that it
      // doesnt get into an infinite loop in <unregister_proxy_factory> as it is 
      // invoked in the destructor of the class too.
      this->delete_proxy_factory_ = 1;
      delete this->proxy_factory_;
      this->proxy_factory_ = 0;
    }
return 0;
}

CosEventComm::PullConsumer_ptr
CosEventComm::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter::create_proxy (
    ::CosEventComm::PullConsumer_ptr proxy,
    CORBA::Environment &
  )
{
  ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon,
    this->lock_, 0));
  // Verify that an <proxy_factory_> is available else make one.
  if (this->proxy_factory_ == 0)
    ACE_NEW_RETURN (this->proxy_factory_,
        TAO_CosEventComm_PullConsumer_Default_Proxy_Factory (1), 
         0);
      
    
  return this->proxy_factory_->create_proxy (proxy);
}

CosEventComm::TAO_CosEventComm_PullConsumer_Smart_Proxy_Base::TAO_CosEventComm_PullConsumer_Smart_Proxy_Base (::CosEventComm::PullConsumer_ptr proxy)
: base_proxy_ (proxy)
{
}

CosEventComm::TAO_CosEventComm_PullConsumer_Smart_Proxy_Base::~TAO_CosEventComm_PullConsumer_Smart_Proxy_Base (void)
{
}

void CosEventComm::TAO_CosEventComm_PullConsumer_Smart_Proxy_Base::disconnect_pull_consumer  (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  this->base_proxy_->disconnect_pull_consumer (
      ACE_TRY_ENV
    );

}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
  defined (ACE_HAS_GNU_REPO)
template class ACE_Singleton<CosEventComm::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX >;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Singleton<CosEventComm::TAO_CosEventComm_PullConsumer_Proxy_Factory_Adapter, ACE_SYNCH_RECURSIVE_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

static const CORBA::Long _oc_CosEventComm_PullConsumer[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  42, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x436f7345), ACE_NTOHL (0x76656e74), ACE_NTOHL (0x436f6d6d), ACE_NTOHL (0x2f50756c), ACE_NTOHL (0x6c436f6e), ACE_NTOHL (0x73756d65), ACE_NTOHL (0x723a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosEventComm/PullConsumer:1.0
  13, ACE_NTOHL (0x50756c6c), ACE_NTOHL (0x436f6e73), ACE_NTOHL (0x756d6572), ACE_NTOHL (0x0),  // name = PullConsumer
};
static CORBA::TypeCode _tc_TAO_tc_CosEventComm_PullConsumer (CORBA::tk_objref, sizeof (_oc_CosEventComm_PullConsumer), (char *) &_oc_CosEventComm_PullConsumer, 0, sizeof (CosEventComm::PullConsumer));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CosEventComm)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PullConsumer, &_tc_TAO_tc_CosEventComm_PullConsumer)
TAO_NAMESPACE_END
void operator<<= (CORBA::Any &_tao_any, const CosEventComm::Disconnected &_tao_elem) // copying
{
  CosEventComm::Disconnected *_tao_any_val = 0;
  ACE_NEW (_tao_any_val, CosEventComm::Disconnected (_tao_elem));
  if (!_tao_any_val) return;
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_tao_any_val;
    _tao_any._tao_replace (
        CosEventComm::_tc_Disconnected,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _tao_any_val,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY 
  {
    delete _tao_any_val;
  }
  ACE_ENDTRY;
}

void operator<<= (CORBA::Any &_tao_any, CosEventComm::Disconnected *_tao_elem) // non copying
{
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_tao_elem;
    _tao_any._tao_replace (
        CosEventComm::_tc_Disconnected,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _tao_elem,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY
  {
    delete _tao_elem;
    _tao_elem = 0;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventComm::Disconnected *&_tao_elem)
{
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventComm::_tc_Disconnected, ACE_TRY_ENV)) // not equal
      {
        _tao_elem = 0;
        return 0;
      }
    ACE_TRY_CHECK;
    if (_tao_any.any_owns_data ())
    {
      _tao_elem = (CosEventComm::Disconnected *)_tao_any.value ();
      return 1;
    }
    else
    {
      ACE_NEW_RETURN (_tao_elem, CosEventComm::Disconnected, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *_tao_elem)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            CosEventComm::_tc_Disconnected,
            1,
            ACE_reinterpret_cast (void *, _tao_elem),
            ACE_TRY_ENV
          );
        ACE_TRY_CHECK;
        return 1;
      }
      else
      {
        delete _tao_elem;
        _tao_elem = 0;
      }
    }
  }
  ACE_CATCHANY
  {
    delete _tao_elem;
    _tao_elem = 0;
    return 0; 
  }
  ACE_ENDTRY;
  return 0;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CosEventComm::Disconnected *&_tao_elem)
{
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventComm::_tc_Disconnected, ACE_TRY_ENV)) // not equal
      {
        _tao_elem = 0;
        return 0;
      }
    ACE_TRY_CHECK;
    if (_tao_any.any_owns_data ())
    {
      _tao_elem = (CosEventComm::Disconnected *)_tao_any.value ();
      return 1;
    }
    else
    {
      ACE_NEW_RETURN (_tao_elem, CosEventComm::Disconnected, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *(CosEventComm::Disconnected *)_tao_elem)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            CosEventComm::_tc_Disconnected,
            1,
            ACE_reinterpret_cast (void *, ACE_const_cast (CosEventComm::Disconnected *&, _tao_elem)),
            ACE_TRY_ENV
          );
        ACE_TRY_CHECK;
        return 1;
      }
      else
      {
        delete ACE_const_cast (CosEventComm::Disconnected *&, _tao_elem);
        _tao_elem = 0;
      }
    }
  }
  ACE_CATCHANY
  {
    delete ACE_const_cast (CosEventComm::Disconnected *&, _tao_elem);
    _tao_elem = 0;
    return 0; 
  }
  ACE_ENDTRY;
  return 0;
}

CosEventComm::PushConsumer_ptr (*_TAO_collocation_CosEventComm_PushConsumer_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventComm::PushConsumer_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventComm::PushConsumer::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventComm::_tc_PushConsumer, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventComm::PushConsumer_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventComm::PushConsumer::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventComm::_tc_PushConsumer, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventComm::PushConsumer::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventComm::_tc_PushConsumer,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventComm::PushConsumer::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventComm::PushConsumer::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventComm::PushConsumer,CosEventComm::PushConsumer_var>;
  template class TAO_Object_Manager<CosEventComm::PushConsumer,CosEventComm::PushConsumer_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventComm::PushConsumer,CosEventComm::PushConsumer_var>
#  pragma instantiate TAO_Object_Manager<CosEventComm::PushConsumer,CosEventComm::PushConsumer_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventComm::PushSupplier_ptr (*_TAO_collocation_CosEventComm_PushSupplier_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventComm::PushSupplier_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventComm::PushSupplier::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventComm::_tc_PushSupplier, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventComm::PushSupplier_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventComm::PushSupplier::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventComm::_tc_PushSupplier, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventComm::PushSupplier::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventComm::_tc_PushSupplier,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventComm::PushSupplier::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventComm::PushSupplier::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventComm::PushSupplier,CosEventComm::PushSupplier_var>;
  template class TAO_Object_Manager<CosEventComm::PushSupplier,CosEventComm::PushSupplier_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventComm::PushSupplier,CosEventComm::PushSupplier_var>
#  pragma instantiate TAO_Object_Manager<CosEventComm::PushSupplier,CosEventComm::PushSupplier_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventComm::PullSupplier_ptr (*_TAO_collocation_CosEventComm_PullSupplier_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventComm::PullSupplier_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventComm::PullSupplier::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventComm::_tc_PullSupplier, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventComm::PullSupplier_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventComm::PullSupplier::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventComm::_tc_PullSupplier, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventComm::PullSupplier::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventComm::_tc_PullSupplier,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventComm::PullSupplier::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventComm::PullSupplier::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventComm::PullSupplier,CosEventComm::PullSupplier_var>;
  template class TAO_Object_Manager<CosEventComm::PullSupplier,CosEventComm::PullSupplier_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventComm::PullSupplier,CosEventComm::PullSupplier_var>
#  pragma instantiate TAO_Object_Manager<CosEventComm::PullSupplier,CosEventComm::PullSupplier_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

CosEventComm::PullConsumer_ptr (*_TAO_collocation_CosEventComm_PullConsumer_Stub_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;
void operator<<= (CORBA::Any &_tao_any, CosEventComm::PullConsumer_ptr _tao_elem)
{
  CORBA::Object_ptr *_tao_obj_ptr = 0;
  ACE_TRY_NEW_ENV
  {
    ACE_NEW (_tao_obj_ptr, CORBA::Object_ptr);
    *_tao_obj_ptr = CosEventComm::PullConsumer::_duplicate (_tao_elem);
    TAO_OutputCDR stream;
    if (stream << *_tao_obj_ptr)
    {
      _tao_any._tao_replace (
          CosEventComm::_tc_PullConsumer, 
          TAO_ENCAP_BYTE_ORDER,
          stream.begin (),
          1,
          _tao_obj_ptr,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
    }
    else
    {
      delete _tao_obj_ptr;
    }
  }
  ACE_CATCHANY
  {
    delete _tao_obj_ptr;
  }
  ACE_ENDTRY;
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CosEventComm::PullConsumer_ptr &_tao_elem)
{
  CORBA::Object_ptr *tmp = 0;
  ACE_NEW_RETURN (tmp, CORBA::Object_ptr, 0);
  ACE_TRY_NEW_ENV
  {
    _tao_elem = CosEventComm::PullConsumer::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();
    if (!type->equivalent (CosEventComm::_tc_PullConsumer, ACE_TRY_ENV)) // not equal
      {
        delete tmp;
        return 0;
      }
    ACE_TRY_CHECK;
    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    CORBA::Object_var _tao_obj_var;
    if (stream >> _tao_obj_var.out ())
    {
      _tao_elem = CosEventComm::PullConsumer::_narrow (_tao_obj_var.in (), ACE_TRY_ENV);
      ACE_TRY_CHECK;
      *tmp = (CORBA::Object_ptr) _tao_elem;  // any owns the object
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          CosEventComm::_tc_PullConsumer,
          1,
          tmp,
          ACE_TRY_ENV
        );
      ACE_TRY_CHECK;
      return 1;
    }
    else    // failure
    {
      delete tmp;
    }
  }
  ACE_CATCHANY
  {
    delete tmp;
    _tao_elem = CosEventComm::PullConsumer::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = CosEventComm::PullConsumer::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Field_T<CosEventComm::PullConsumer,CosEventComm::PullConsumer_var>;
  template class TAO_Object_Manager<CosEventComm::PullConsumer,CosEventComm::PullConsumer_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#  pragma instantiate TAO_Object_Field_T<CosEventComm::PullConsumer,CosEventComm::PullConsumer_var>
#  pragma instantiate TAO_Object_Manager<CosEventComm::PullConsumer,CosEventComm::PullConsumer_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

