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

// ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
// TAO and the TAO IDL Compiler have been developed by:
//       Center for Distributed Object Computing
//       Washington University
//       St. Louis, MO
//       USA
//       http://www.cs.wustl.edu/~schmidt/doc-center.html
// and
//       Distributed Object Computing Laboratory
//       University of California at Irvine
//       Irvine, CA
//       USA
//       http://doc.ece.uci.edu/
// and
//       Institute for Software Integrated Systems
//       Vanderbilt University
//       Nashville, TN
//       USA
//       http://www.isis.vanderbilt.edu/
//
// Information about TAO is available at:
//     http://www.cs.wustl.edu/~schmidt/TAO.html

// TAO_IDL - Generated from
// be/be_codegen.cpp:303


#include "CosTypedEventCommC.h"
#include "tao/CDR.h"
#include "tao/Exception_Data.h"
#include "tao/Invocation_Adapter.h"
#include "tao/Object_T.h"
#include "tao/Typecode.h"
#include "tao/Any_Impl_T.h"
#include "tao/Object_Argument_T.h"
#include "tao/Special_Basic_Arguments.h"
#include "tao/Var_Size_Argument_T.h"
#include "ace/OS_NS_string.h"

#if defined (__BORLANDC__)
#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
#endif /* __BORLANDC__ */

#if !defined (__ACE_INLINE__)
#include "CosTypedEventCommC.inl"
#endif /* !defined __ACE_INLINE__ */

// TAO_IDL - Generated from
// be/be_visitor_arg_traits.cpp:64

// Arg traits specializations.
namespace TAO
{
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:582

#if !defined (_CORBA_ANY__ARG_TRAITS_CS_)
#define _CORBA_ANY__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_Event_Export Arg_Traits<CORBA::Any>
    : public
        Var_Size_Arg_Traits_T<
            CORBA::Any,
            CORBA::Any_var,
            CORBA::Any_out
          >
  {
  };

#endif /* end #if !defined */
}


// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:60

// Traits specializations for CosTypedEventComm::TypedPushConsumer.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosTypedEventComm::TypedPushConsumer_ptr
TAO::Objref_Traits<CosTypedEventComm::TypedPushConsumer>::tao_duplicate (
    CosTypedEventComm::TypedPushConsumer_ptr p
  )
{
  return CosTypedEventComm::TypedPushConsumer::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<CosTypedEventComm::TypedPushConsumer>::tao_release (
    CosTypedEventComm::TypedPushConsumer_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosTypedEventComm::TypedPushConsumer_ptr
TAO::Objref_Traits<CosTypedEventComm::TypedPushConsumer>::tao_nil (void)
{
  return CosTypedEventComm::TypedPushConsumer::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<CosTypedEventComm::TypedPushConsumer>::tao_marshal (
    CosTypedEventComm::TypedPushConsumer_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

// Function pointer for collocation factory initialization.
TAO::Collocation_Proxy_Broker * 
(*CosTypedEventComm__TAO_TypedPushConsumer_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

// TAO_IDL - Generated from
// be/be_visitor_operation/operation_cs.cpp:78

CORBA::Object_ptr CosTypedEventComm::TypedPushConsumer::get_typed_consumer (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_TypedPushConsumer_Proxy_Broker_ == 0)
    {
      CosTypedEventComm_TypedPushConsumer_setup_collocation ();
    }
  
  TAO::Arg_Traits< CORBA::Object>::ret_val _tao_retval;
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "get_typed_consumer",
      18,
      this->the_TAO_TypedPushConsumer_Proxy_Broker_
    );
  
  _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

CosTypedEventComm::TypedPushConsumer::TypedPushConsumer (void)
 : the_TAO_TypedPushConsumer_Proxy_Broker_ (0)
{
  this->CosTypedEventComm_TypedPushConsumer_setup_collocation ();
}

void
CosTypedEventComm::TypedPushConsumer::CosTypedEventComm_TypedPushConsumer_setup_collocation ()
{
  if (::CosTypedEventComm__TAO_TypedPushConsumer_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_TypedPushConsumer_Proxy_Broker_ =
        ::CosTypedEventComm__TAO_TypedPushConsumer_Proxy_Broker_Factory_function_pointer (this);
    }
  
  this->CosEventComm_PushConsumer_setup_collocation ();
}

CosTypedEventComm::TypedPushConsumer::~TypedPushConsumer (void)
{}

void 
CosTypedEventComm::TypedPushConsumer::_tao_any_destructor (void *_tao_void_pointer)
{
  TypedPushConsumer *_tao_tmp_pointer =
    static_cast<TypedPushConsumer *> (_tao_void_pointer);
  CORBA::release (_tao_tmp_pointer);
}

CosTypedEventComm::TypedPushConsumer_ptr
CosTypedEventComm::TypedPushConsumer::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<TypedPushConsumer>::narrow (
        _tao_objref,
        "IDL:omg.org/CosTypedEventComm/TypedPushConsumer:1.0",
        CosTypedEventComm__TAO_TypedPushConsumer_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosTypedEventComm::TypedPushConsumer_ptr
CosTypedEventComm::TypedPushConsumer::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<TypedPushConsumer>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/CosTypedEventComm/TypedPushConsumer:1.0",
        CosTypedEventComm__TAO_TypedPushConsumer_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosTypedEventComm::TypedPushConsumer_ptr
CosTypedEventComm::TypedPushConsumer::_duplicate (TypedPushConsumer_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

CORBA::Boolean
CosTypedEventComm::TypedPushConsumer::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CosEventComm/PushConsumer:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CosTypedEventComm/TypedPushConsumer:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1; // success using local knowledge
    }
  else
    {
      return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
          value
          ACE_ENV_ARG_PARAMETER
        );
    }
}

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

CORBA::Boolean
CosTypedEventComm::TypedPushConsumer::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/typecode_defn.cpp:290

static const CORBA::Long _oc_CosTypedEventComm_TypedPushConsumer[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  52,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f7354), 
  ACE_NTOHL (0x79706564), 
  ACE_NTOHL (0x4576656e), 
  ACE_NTOHL (0x74436f6d), 
  ACE_NTOHL (0x6d2f5479), 
  ACE_NTOHL (0x70656450), 
  ACE_NTOHL (0x75736843), 
  ACE_NTOHL (0x6f6e7375), 
  ACE_NTOHL (0x6d65723a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CosTypedEventComm/TypedPushConsumer:1.0
    18,
  ACE_NTOHL (0x54797065), 
  ACE_NTOHL (0x64507573), 
  ACE_NTOHL (0x68436f6e), 
  ACE_NTOHL (0x73756d65), 
  ACE_NTOHL (0x72000000),  // name = TypedPushConsumer
  };

static CORBA::TypeCode _tc_TAO_tc_CosTypedEventComm_TypedPushConsumer (
    CORBA::tk_objref,
    sizeof (_oc_CosTypedEventComm_TypedPushConsumer),
    (char *) &_oc_CosTypedEventComm_TypedPushConsumer,
    0,
    sizeof (CosTypedEventComm::TypedPushConsumer)
  );

namespace CosTypedEventComm
{
  ::CORBA::TypeCode_ptr _tc_TypedPushConsumer =
    &_tc_TAO_tc_CosTypedEventComm_TypedPushConsumer;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/interface_cs.cpp:60

// Traits specializations for CosTypedEventComm::TypedPullSupplier.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosTypedEventComm::TypedPullSupplier_ptr
TAO::Objref_Traits<CosTypedEventComm::TypedPullSupplier>::tao_duplicate (
    CosTypedEventComm::TypedPullSupplier_ptr p
  )
{
  return CosTypedEventComm::TypedPullSupplier::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<CosTypedEventComm::TypedPullSupplier>::tao_release (
    CosTypedEventComm::TypedPullSupplier_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosTypedEventComm::TypedPullSupplier_ptr
TAO::Objref_Traits<CosTypedEventComm::TypedPullSupplier>::tao_nil (void)
{
  return CosTypedEventComm::TypedPullSupplier::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<CosTypedEventComm::TypedPullSupplier>::tao_marshal (
    CosTypedEventComm::TypedPullSupplier_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

// Function pointer for collocation factory initialization.
TAO::Collocation_Proxy_Broker * 
(*CosTypedEventComm__TAO_TypedPullSupplier_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

// TAO_IDL - Generated from
// be/be_visitor_operation/operation_cs.cpp:78

CORBA::Object_ptr CosTypedEventComm::TypedPullSupplier::get_typed_supplier (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_TypedPullSupplier_Proxy_Broker_ == 0)
    {
      CosTypedEventComm_TypedPullSupplier_setup_collocation ();
    }
  
  TAO::Arg_Traits< CORBA::Object>::ret_val _tao_retval;
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "get_typed_supplier",
      18,
      this->the_TAO_TypedPullSupplier_Proxy_Broker_
    );
  
  _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

CosTypedEventComm::TypedPullSupplier::TypedPullSupplier (void)
 : the_TAO_TypedPullSupplier_Proxy_Broker_ (0)
{
  this->CosTypedEventComm_TypedPullSupplier_setup_collocation ();
}

void
CosTypedEventComm::TypedPullSupplier::CosTypedEventComm_TypedPullSupplier_setup_collocation ()
{
  if (::CosTypedEventComm__TAO_TypedPullSupplier_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_TypedPullSupplier_Proxy_Broker_ =
        ::CosTypedEventComm__TAO_TypedPullSupplier_Proxy_Broker_Factory_function_pointer (this);
    }
  
  this->CosEventComm_PullSupplier_setup_collocation ();
}

CosTypedEventComm::TypedPullSupplier::~TypedPullSupplier (void)
{}

void 
CosTypedEventComm::TypedPullSupplier::_tao_any_destructor (void *_tao_void_pointer)
{
  TypedPullSupplier *_tao_tmp_pointer =
    static_cast<TypedPullSupplier *> (_tao_void_pointer);
  CORBA::release (_tao_tmp_pointer);
}

CosTypedEventComm::TypedPullSupplier_ptr
CosTypedEventComm::TypedPullSupplier::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<TypedPullSupplier>::narrow (
        _tao_objref,
        "IDL:omg.org/CosTypedEventComm/TypedPullSupplier:1.0",
        CosTypedEventComm__TAO_TypedPullSupplier_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosTypedEventComm::TypedPullSupplier_ptr
CosTypedEventComm::TypedPullSupplier::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<TypedPullSupplier>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/CosTypedEventComm/TypedPullSupplier:1.0",
        CosTypedEventComm__TAO_TypedPullSupplier_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosTypedEventComm::TypedPullSupplier_ptr
CosTypedEventComm::TypedPullSupplier::_duplicate (TypedPullSupplier_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

CORBA::Boolean
CosTypedEventComm::TypedPullSupplier::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CosEventComm/PullSupplier:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CosTypedEventComm/TypedPullSupplier:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/CORBA/Object:1.0"
        )
     )
    {
      return 1; // success using local knowledge
    }
  else
    {
      return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a (
          value
          ACE_ENV_ARG_PARAMETER
        );
    }
}

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

CORBA::Boolean
CosTypedEventComm::TypedPullSupplier::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

// TAO_IDL - Generated from
// be/be_visitor_typecode/typecode_defn.cpp:290

static const CORBA::Long _oc_CosTypedEventComm_TypedPullSupplier[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  52,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f7354), 
  ACE_NTOHL (0x79706564), 
  ACE_NTOHL (0x4576656e), 
  ACE_NTOHL (0x74436f6d), 
  ACE_NTOHL (0x6d2f5479), 
  ACE_NTOHL (0x70656450), 
  ACE_NTOHL (0x756c6c53), 
  ACE_NTOHL (0x7570706c), 
  ACE_NTOHL (0x6965723a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CosTypedEventComm/TypedPullSupplier:1.0
    18,
  ACE_NTOHL (0x54797065), 
  ACE_NTOHL (0x6450756c), 
  ACE_NTOHL (0x6c537570), 
  ACE_NTOHL (0x706c6965), 
  ACE_NTOHL (0x72000000),  // name = TypedPullSupplier
  };

static CORBA::TypeCode _tc_TAO_tc_CosTypedEventComm_TypedPullSupplier (
    CORBA::tk_objref,
    sizeof (_oc_CosTypedEventComm_TypedPullSupplier),
    (char *) &_oc_CosTypedEventComm_TypedPullSupplier,
    0,
    sizeof (CosTypedEventComm::TypedPullSupplier)
  );

namespace CosTypedEventComm
{
  ::CORBA::TypeCode_ptr _tc_TypedPullSupplier =
    &_tc_TAO_tc_CosTypedEventComm_TypedPullSupplier;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/any_op_cs.cpp:50

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Impl_T<CosTypedEventComm::TypedPushConsumer>::to_object (
    CORBA::Object_ptr &_tao_elem
  ) const
{
  _tao_elem = CORBA::Object::_duplicate (this->value_);
  return 1;
}

// Copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    CosTypedEventComm::TypedPushConsumer_ptr _tao_elem
  )
{
  CosTypedEventComm::TypedPushConsumer_ptr _tao_objptr =
    CosTypedEventComm::TypedPushConsumer::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

// Non-copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    CosTypedEventComm::TypedPushConsumer_ptr *_tao_elem
  )
{
  TAO::Any_Impl_T<CosTypedEventComm::TypedPushConsumer>::insert (
      _tao_any,
      CosTypedEventComm::TypedPushConsumer::_tao_any_destructor,
      CosTypedEventComm::_tc_TypedPushConsumer,
      *_tao_elem
    );
}

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    CosTypedEventComm::TypedPushConsumer_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<CosTypedEventComm::TypedPushConsumer>::extract (
        _tao_any,
        CosTypedEventComm::TypedPushConsumer::_tao_any_destructor,
        CosTypedEventComm::_tc_TypedPushConsumer,
        _tao_elem
      );
}

// TAO_IDL - Generated from
// be/be_visitor_interface/any_op_cs.cpp:50

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Impl_T<CosTypedEventComm::TypedPullSupplier>::to_object (
    CORBA::Object_ptr &_tao_elem
  ) const
{
  _tao_elem = CORBA::Object::_duplicate (this->value_);
  return 1;
}

// Copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    CosTypedEventComm::TypedPullSupplier_ptr _tao_elem
  )
{
  CosTypedEventComm::TypedPullSupplier_ptr _tao_objptr =
    CosTypedEventComm::TypedPullSupplier::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

// Non-copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    CosTypedEventComm::TypedPullSupplier_ptr *_tao_elem
  )
{
  TAO::Any_Impl_T<CosTypedEventComm::TypedPullSupplier>::insert (
      _tao_any,
      CosTypedEventComm::TypedPullSupplier::_tao_any_destructor,
      CosTypedEventComm::_tc_TypedPullSupplier,
      *_tao_elem
    );
}

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    CosTypedEventComm::TypedPullSupplier_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<CosTypedEventComm::TypedPullSupplier>::extract (
        _tao_any,
        CosTypedEventComm::TypedPullSupplier::_tao_any_destructor,
        CosTypedEventComm::_tc_TypedPullSupplier,
        _tao_elem
      );
}

// TAO_IDL - Generated from
// be/be_visitor_interface/cdr_op_cs.cpp:63

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosTypedEventComm::TypedPushConsumer_ptr _tao_objref
  )
{
  CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosTypedEventComm::TypedPushConsumer_ptr &_tao_objref
  )
{
  CORBA::Object_var obj;
  
  if ((strm >> obj.inout ()) == 0)
    {
      return 0;
    }
  
  typedef ::CosTypedEventComm::TypedPushConsumer RHS_SCOPED_NAME;
  
  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        CosTypedEventComm__TAO_TypedPushConsumer_Proxy_Broker_Factory_function_pointer
      );
    
  return 1;
}

// TAO_IDL - Generated from
// be/be_visitor_interface/cdr_op_cs.cpp:63

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosTypedEventComm::TypedPullSupplier_ptr _tao_objref
  )
{
  CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosTypedEventComm::TypedPullSupplier_ptr &_tao_objref
  )
{
  CORBA::Object_var obj;
  
  if ((strm >> obj.inout ()) == 0)
    {
      return 0;
    }
  
  typedef ::CosTypedEventComm::TypedPullSupplier RHS_SCOPED_NAME;
  
  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        CosTypedEventComm__TAO_TypedPullSupplier_Proxy_Broker_Factory_function_pointer
      );
    
  return 1;
}

