// -*- 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 "FtRtecEventCommC.h"
#include "tao/CDR.h"
#include "tao/Exception_Data.h"
#include "tao/Invocation_Adapter.h"
#include "tao/Messaging/Asynch_Invocation_Adapter.h"
#include "tao/Valuetype/ValueFactory.h"
#include "tao/Object_T.h"
#include "tao/ORB_Core.h"
#include "tao/Typecode.h"
#include "tao/Any_Impl_T.h"
#include "tao/Any_Dual_Impl_T.h"
#include "tao/Basic_Arguments.h"
#include "tao/Object_Argument_T.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 "FtRtecEventCommC.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:379

#if !defined (_RTECEVENTCOMM_EVENTSET__ARG_TRAITS_CS_)
#define _RTECEVENTCOMM_EVENTSET__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FtRtEvent_Export Arg_Traits<RtecEventComm::EventSet>
    : public
        Var_Size_Arg_Traits_T<
            RtecEventComm::EventSet,
            RtecEventComm::EventSet_var,
            RtecEventComm::EventSet_out
          >
  {
  };

#endif /* end #if !defined */
  
  // TAO_IDL - Generated from
  // be/be_visitor_arg_traits.cpp:379

#if !defined (_FTRTECEVENTCOMM_OBJECTID__ARG_TRAITS_CS_)
#define _FTRTECEVENTCOMM_OBJECTID__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FtRtEvent_Export Arg_Traits<FtRtecEventComm::ObjectId>
    : public
        Var_Size_Arg_Traits_T<
            FtRtecEventComm::ObjectId,
            FtRtecEventComm::ObjectId_var,
            FtRtecEventComm::ObjectId_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_FTRTECEVENTCOMM_AMI_PUSHCONSUMEREXCEPTIONHOLDER__ARG_TRAITS_CS_)
#define _FTRTECEVENTCOMM_AMI_PUSHCONSUMEREXCEPTIONHOLDER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FtRtEvent_Export Arg_Traits<FtRtecEventComm::AMI_PushConsumerExceptionHolder>
    : public
        Object_Arg_Traits_T<
            FtRtecEventComm::AMI_PushConsumerExceptionHolder *,
            FtRtecEventComm::AMI_PushConsumerExceptionHolder_var,
            FtRtecEventComm::AMI_PushConsumerExceptionHolder_out,
            TAO::Value_Traits<FtRtecEventComm::AMI_PushConsumerExceptionHolder>
          >
  {
  };

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


// TAO_IDL - Generated from 
// be/be_visitor_sequence/sequence_cs.cpp:65

#if !defined (_FTRTECEVENTCOMM_OBJECTID_CS_)
#define _FTRTECEVENTCOMM_OBJECTID_CS_

FtRtecEventComm::ObjectId::ObjectId (void)
{}

FtRtecEventComm::ObjectId::ObjectId (
    CORBA::ULong max
  )
  : TAO_Unbounded_Sequence<
        CORBA::Octet
      >
    (max)
{}

FtRtecEventComm::ObjectId::ObjectId (
    CORBA::ULong max,
    CORBA::ULong length,
    CORBA::Octet * buffer,
    CORBA::Boolean release
  )
  : TAO_Unbounded_Sequence<
        CORBA::Octet
      >
    (max, length, buffer, release)
{}

FtRtecEventComm::ObjectId::ObjectId (
    const ObjectId &seq
  )
  : TAO_Unbounded_Sequence<
        CORBA::Octet
      >
    (seq)
{}

FtRtecEventComm::ObjectId::~ObjectId (void)
{}

void FtRtecEventComm::ObjectId::_tao_any_destructor (
    void * _tao_void_pointer
  )
{
  ObjectId * _tao_tmp_pointer =
    static_cast<ObjectId *> (_tao_void_pointer);
  delete _tao_tmp_pointer;
}

#endif /* end #if !defined */

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

static const CORBA::Long _oc_FtRtecEventComm_ObjectId[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  33,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x46745274), 
  ACE_NTOHL (0x65634576), 
  ACE_NTOHL (0x656e7443), 
  ACE_NTOHL (0x6f6d6d2f), 
  ACE_NTOHL (0x4f626a65), 
  ACE_NTOHL (0x63744964), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:FtRtecEventComm/ObjectId:1.0
    9,
  ACE_NTOHL (0x4f626a65), 
  ACE_NTOHL (0x63744964), 
  ACE_NTOHL (0x0),  // name = ObjectId
    CORBA::tk_sequence, // typecode kind
  12, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    CORBA::tk_octet,

    0U,

};

static CORBA::TypeCode _tc_TAO_tc_FtRtecEventComm_ObjectId (
    CORBA::tk_alias,
    sizeof (_oc_FtRtecEventComm_ObjectId),
    (char *) &_oc_FtRtecEventComm_ObjectId,
    0,
    sizeof (FtRtecEventComm::ObjectId)
  );

namespace FtRtecEventComm
{
  ::CORBA::TypeCode_ptr _tc_ObjectId =
    &_tc_TAO_tc_FtRtecEventComm_ObjectId;
}

// TAO_IDL - Generated from 
// be/be_visitor_exception/exception_cs.cpp:63

FtRtecEventComm::InvalidObjectID::InvalidObjectID (void)
  : CORBA::UserException (
        "IDL:FtRtecEventComm/InvalidObjectID:1.0",
        "InvalidObjectID"
      )
{
}

FtRtecEventComm::InvalidObjectID::~InvalidObjectID (void)
{
}

FtRtecEventComm::InvalidObjectID::InvalidObjectID (const ::FtRtecEventComm::InvalidObjectID &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
}

FtRtecEventComm::InvalidObjectID&
FtRtecEventComm::InvalidObjectID::operator= (const ::FtRtecEventComm::InvalidObjectID &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  return *this;
}

void FtRtecEventComm::InvalidObjectID::_tao_any_destructor (void *_tao_void_pointer)
{
  InvalidObjectID *_tao_tmp_pointer =
    static_cast<InvalidObjectID*> (_tao_void_pointer);
  delete _tao_tmp_pointer;
}

FtRtecEventComm::InvalidObjectID *
FtRtecEventComm::InvalidObjectID::_downcast (CORBA::Exception *_tao_excp)
{
  if (!ACE_OS::strcmp ("IDL:FtRtecEventComm/InvalidObjectID:1.0", _tao_excp->_rep_id ()))
    {
      return dynamic_cast<InvalidObjectID *> (_tao_excp);
    }
  else
    {
      return 0;
    }
}

CORBA::Exception *FtRtecEventComm::InvalidObjectID::_alloc (void)
{
  CORBA::Exception *retval = 0;
  ACE_NEW_RETURN (retval, ::FtRtecEventComm::InvalidObjectID, 0);
  return retval;
}

CORBA::Exception *
FtRtecEventComm::InvalidObjectID::_tao_duplicate (void) const
{
  CORBA::Exception *result;
  ACE_NEW_RETURN (
      result,
      ::FtRtecEventComm::InvalidObjectID (*this),
      0
    );
  return result;
}

void FtRtecEventComm::InvalidObjectID::_raise (void) const
{
  TAO_RAISE (*this);
}

void FtRtecEventComm::InvalidObjectID::_tao_encode (
    TAO_OutputCDR &cdr
    ACE_ENV_ARG_DECL
  ) const
{
  if (cdr << *this)
    {
      return;
    }
  
  ACE_THROW (CORBA::MARSHAL ());
}

void FtRtecEventComm::InvalidObjectID::_tao_decode (
    TAO_InputCDR &cdr
    ACE_ENV_ARG_DECL
  )
{
  if (cdr >> *this)
    {
      return;
    }
  
  ACE_THROW (CORBA::MARSHAL ());
}

// TAO extension - the virtual _type method.
CORBA::TypeCode_ptr FtRtecEventComm::InvalidObjectID::_type (void) const
{
  return ::FtRtecEventComm::_tc_InvalidObjectID;
}

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

static const CORBA::Long _oc_FtRtecEventComm_InvalidObjectID[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  40,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x46745274), 
  ACE_NTOHL (0x65634576), 
  ACE_NTOHL (0x656e7443), 
  ACE_NTOHL (0x6f6d6d2f), 
  ACE_NTOHL (0x496e7661), 
  ACE_NTOHL (0x6c69644f), 
  ACE_NTOHL (0x626a6563), 
  ACE_NTOHL (0x7449443a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:FtRtecEventComm/InvalidObjectID:1.0
    16,
  ACE_NTOHL (0x496e7661), 
  ACE_NTOHL (0x6c69644f), 
  ACE_NTOHL (0x626a6563), 
  ACE_NTOHL (0x74494400),  // name = InvalidObjectID
  0, // member count
  };

static CORBA::TypeCode _tc_TAO_tc_FtRtecEventComm_InvalidObjectID (
    CORBA::tk_except,
    sizeof (_oc_FtRtecEventComm_InvalidObjectID),
    (char *) &_oc_FtRtecEventComm_InvalidObjectID,
    0,
    sizeof (FtRtecEventComm::InvalidObjectID)
  );

namespace FtRtecEventComm
{
  ::CORBA::TypeCode_ptr _tc_InvalidObjectID =
    &_tc_TAO_tc_FtRtecEventComm_InvalidObjectID;
}

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

// Traits specializations for FtRtecEventComm::PushConsumer.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
FtRtecEventComm::PushConsumer_ptr
TAO::Objref_Traits<FtRtecEventComm::PushConsumer>::tao_duplicate (
    FtRtecEventComm::PushConsumer_ptr p
  )
{
  return FtRtecEventComm::PushConsumer::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<FtRtecEventComm::PushConsumer>::tao_release (
    FtRtecEventComm::PushConsumer_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
FtRtecEventComm::PushConsumer_ptr
TAO::Objref_Traits<FtRtecEventComm::PushConsumer>::tao_nil (void)
{
  return FtRtecEventComm::PushConsumer::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<FtRtecEventComm::PushConsumer>::tao_marshal (
    FtRtecEventComm::PushConsumer_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

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

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

void FtRtecEventComm::PushConsumer::push (
    const ::FtRtecEventComm::ObjectId & oid,
    const ::RtecEventComm::EventSet & data
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::FtRtecEventComm::InvalidObjectID
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_PushConsumer_Proxy_Broker_ == 0)
    {
      FtRtecEventComm_PushConsumer_setup_collocation ();
    }
  
  TAO::Arg_Traits< void>::ret_val _tao_retval;
  TAO::Arg_Traits< ::FtRtecEventComm::ObjectId>::in_arg_val _tao_oid (oid);
  TAO::Arg_Traits< ::RtecEventComm::EventSet>::in_arg_val _tao_data (data);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_oid,
      &_tao_data
    };
  
  static TAO::Exception_Data
  _tao_FtRtecEventComm_PushConsumer_push_exceptiondata [] = 
    {
      {
        "IDL:FtRtecEventComm/InvalidObjectID:1.0",
        FtRtecEventComm::InvalidObjectID::_alloc,
        FtRtecEventComm::_tc_InvalidObjectID
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      3,
      "push",
      4,
      this->the_TAO_PushConsumer_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_FtRtecEventComm_PushConsumer_push_exceptiondata,
      1
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK;
}

// TAO_IDL - Generated from
// be/be_visitor_operation/ami_cs.cpp:71

void
FtRtecEventComm::PushConsumer::sendc_push (
    ::FtRtecEventComm::AMI_PushConsumerHandler_ptr ami_handler,
    const ::FtRtecEventComm::ObjectId & oid,
    const ::RtecEventComm::EventSet & data
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_PushConsumer_Proxy_Broker_ == 0)
    {
      FtRtecEventComm_PushConsumer_setup_collocation ();
    }
  
  TAO::Arg_Traits<void>::ret_val _tao_retval;
  TAO::Arg_Traits< ::FtRtecEventComm::ObjectId>::in_arg_val _tao_oid (oid);
  TAO::Arg_Traits< ::RtecEventComm::EventSet>::in_arg_val _tao_data (data);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_oid,
      &_tao_data
    };
  
  TAO::Asynch_Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      3,
      "push",
      4,
      this->the_TAO_PushConsumer_Proxy_Broker_
    );
  
  _tao_call.invoke (
      ami_handler,
      &FtRtecEventComm::AMI_PushConsumerHandler::push_reply_stub
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK;
}

FtRtecEventComm::PushConsumer::PushConsumer (void)
 : the_TAO_PushConsumer_Proxy_Broker_ (0)
{
  this->FtRtecEventComm_PushConsumer_setup_collocation ();
}

void
FtRtecEventComm::PushConsumer::FtRtecEventComm_PushConsumer_setup_collocation ()
{
  if (::FtRtecEventComm__TAO_PushConsumer_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_PushConsumer_Proxy_Broker_ =
        ::FtRtecEventComm__TAO_PushConsumer_Proxy_Broker_Factory_function_pointer (this);
    }
}

FtRtecEventComm::PushConsumer::~PushConsumer (void)
{}

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

FtRtecEventComm::PushConsumer_ptr
FtRtecEventComm::PushConsumer::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<PushConsumer>::narrow (
        _tao_objref,
        "IDL:FtRtecEventComm/PushConsumer:1.0",
        FtRtecEventComm__TAO_PushConsumer_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

FtRtecEventComm::PushConsumer_ptr
FtRtecEventComm::PushConsumer::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<PushConsumer>::unchecked_narrow (
        _tao_objref,
        "IDL:FtRtecEventComm/PushConsumer:1.0",
        FtRtecEventComm__TAO_PushConsumer_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

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

CORBA::Boolean
FtRtecEventComm::PushConsumer::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:FtRtecEventComm/PushConsumer: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* FtRtecEventComm::PushConsumer::_interface_repository_id (void) const
{
  return "IDL:FtRtecEventComm/PushConsumer:1.0";
}

CORBA::Boolean
FtRtecEventComm::PushConsumer::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

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

static const CORBA::Long _oc_FtRtecEventComm_PushConsumer[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  37,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x46745274), 
  ACE_NTOHL (0x65634576), 
  ACE_NTOHL (0x656e7443), 
  ACE_NTOHL (0x6f6d6d2f), 
  ACE_NTOHL (0x50757368), 
  ACE_NTOHL (0x436f6e73), 
  ACE_NTOHL (0x756d6572), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:FtRtecEventComm/PushConsumer:1.0
    13,
  ACE_NTOHL (0x50757368), 
  ACE_NTOHL (0x436f6e73), 
  ACE_NTOHL (0x756d6572), 
  ACE_NTOHL (0x0),  // name = PushConsumer
  };

static CORBA::TypeCode _tc_TAO_tc_FtRtecEventComm_PushConsumer (
    CORBA::tk_objref,
    sizeof (_oc_FtRtecEventComm_PushConsumer),
    (char *) &_oc_FtRtecEventComm_PushConsumer,
    0,
    sizeof (FtRtecEventComm::PushConsumer)
  );

namespace FtRtecEventComm
{
  ::CORBA::TypeCode_ptr _tc_PushConsumer =
    &_tc_TAO_tc_FtRtecEventComm_PushConsumer;
}

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

static const CORBA::Long _oc_FtRtecEventComm_AMI_PushConsumerExceptionHolder[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  9,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL::1.0
    32,
  ACE_NTOHL (0x414d495f), 
  ACE_NTOHL (0x50757368), 
  ACE_NTOHL (0x436f6e73), 
  ACE_NTOHL (0x756d6572), 
  ACE_NTOHL (0x45786365), 
  ACE_NTOHL (0x7074696f), 
  ACE_NTOHL (0x6e486f6c), 
  ACE_NTOHL (0x64657200),  // name = AMI_PushConsumerExceptionHolder
    0, // value modifier
  CORBA::tk_value, // typecode kind
  64, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    24,
    ACE_NTOHL (0x49444c3a), 
    ACE_NTOHL (0x45786365), 
    ACE_NTOHL (0x7074696f), 
    ACE_NTOHL (0x6e486f6c), 
    ACE_NTOHL (0x6465723a), 
    ACE_NTOHL (0x312e3000),  // repository ID = IDL:ExceptionHolder:1.0
        16,
    ACE_NTOHL (0x45786365), 
    ACE_NTOHL (0x7074696f), 
    ACE_NTOHL (0x6e486f6c), 
    ACE_NTOHL (0x64657200),  // name = ExceptionHolder
        0, // value modifier
    CORBA::tk_null, // no stateful base valuetype

0, // member count
    
0, // member count
  };

static CORBA::TypeCode _tc_TAO_tc_FtRtecEventComm_AMI_PushConsumerExceptionHolder (
    CORBA::tk_value,
    sizeof (_oc_FtRtecEventComm_AMI_PushConsumerExceptionHolder),
    (char *) &_oc_FtRtecEventComm_AMI_PushConsumerExceptionHolder,
    0,
    sizeof (FtRtecEventComm::AMI_PushConsumerExceptionHolder)
  );

namespace FtRtecEventComm
{
  ::CORBA::TypeCode_ptr _tc_AMI_PushConsumerExceptionHolder =
    &_tc_TAO_tc_FtRtecEventComm_AMI_PushConsumerExceptionHolder;
}

// TAO_IDL - Generated from
// be/be_visitor_valuetype/valuetype_cs.cpp:66

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION 
void
TAO::Value_Traits<FtRtecEventComm::AMI_PushConsumerExceptionHolder>::tao_add_ref (
    FtRtecEventComm::AMI_PushConsumerExceptionHolder * p
  )
{
  CORBA::add_ref (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION 
void
TAO::Value_Traits<FtRtecEventComm::AMI_PushConsumerExceptionHolder>::tao_remove_ref (
    FtRtecEventComm::AMI_PushConsumerExceptionHolder * p
  )
{
  CORBA::remove_ref (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION 
void
TAO::Value_Traits<FtRtecEventComm::AMI_PushConsumerExceptionHolder>::tao_release (
    FtRtecEventComm::AMI_PushConsumerExceptionHolder * p
  )
{
  CORBA::remove_ref (p);
}

FtRtecEventComm::AMI_PushConsumerExceptionHolder *
FtRtecEventComm::AMI_PushConsumerExceptionHolder::_downcast (CORBA::ValueBase *v)
{
  if (v == 0)
    {
      return 0;
    }
  
  return dynamic_cast< ::FtRtecEventComm::AMI_PushConsumerExceptionHolder * > (v);
}

const char *
FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_obv_repository_id (void) const
{
  return this->_tao_obv_static_repository_id ();
}

void
FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_any_destructor (void *_tao_void_pointer)
{
  AMI_PushConsumerExceptionHolder *_tao_tmp_pointer =
    static_cast<
        AMI_PushConsumerExceptionHolder *> (
        _tao_void_pointer
      );
  CORBA::remove_ref (_tao_tmp_pointer);
}

CORBA::Boolean FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_marshal_v (TAO_OutputCDR & strm)
{
  return this->_tao_marshal__FtRtecEventComm_AMI_PushConsumerExceptionHolder (strm);
}

CORBA::Boolean FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_unmarshal_v (TAO_InputCDR & strm)
{
  return this->_tao_unmarshal__FtRtecEventComm_AMI_PushConsumerExceptionHolder (strm);
}

CORBA::Boolean FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_unmarshal (
    TAO_InputCDR &strm,
    AMI_PushConsumerExceptionHolder *&new_object
  )
{
  CORBA::ValueBase *base = 0;
  CORBA::ValueFactory_var factory;
  CORBA::Boolean retval =
    CORBA::ValueBase::_tao_unmarshal_pre (
        strm,
        factory.out (),
        base,
        AMI_PushConsumerExceptionHolder::_tao_obv_static_repository_id ()
      );
  
  if (retval == 0)
    {
      return 0;
    }
  
  if (factory.in () != 0)
    {
      base = factory->create_for_unmarshal ();
      
      if (base == 0)
        {
          return 0;  // %! except.?
        }
      
      retval = base->_tao_unmarshal_v (strm);
      
      if (retval == 0)
        {
          return 0;
        }
    }
  
  // Now base must be null or point to the unmarshaled object.
  // Align the pointer to the right subobject.
  new_object = AMI_PushConsumerExceptionHolder::_downcast (base);
  return retval;
}

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

// Traits specializations for FtRtecEventComm::AMI_PushConsumerHandler.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
FtRtecEventComm::AMI_PushConsumerHandler_ptr
TAO::Objref_Traits<FtRtecEventComm::AMI_PushConsumerHandler>::tao_duplicate (
    FtRtecEventComm::AMI_PushConsumerHandler_ptr p
  )
{
  return FtRtecEventComm::AMI_PushConsumerHandler::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<FtRtecEventComm::AMI_PushConsumerHandler>::tao_release (
    FtRtecEventComm::AMI_PushConsumerHandler_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
FtRtecEventComm::AMI_PushConsumerHandler_ptr
TAO::Objref_Traits<FtRtecEventComm::AMI_PushConsumerHandler>::tao_nil (void)
{
  return FtRtecEventComm::AMI_PushConsumerHandler::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<FtRtecEventComm::AMI_PushConsumerHandler>::tao_marshal (
    FtRtecEventComm::AMI_PushConsumerHandler_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

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

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

void FtRtecEventComm::AMI_PushConsumerHandler::push (
    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_AMI_PushConsumerHandler_Proxy_Broker_ == 0)
    {
      FtRtecEventComm_AMI_PushConsumerHandler_setup_collocation ();
    }
  
  TAO::Arg_Traits< void>::ret_val _tao_retval;
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "push",
      4,
      this->the_TAO_AMI_PushConsumerHandler_Proxy_Broker_
    );
  
  _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
  ACE_CHECK;
}
void
FtRtecEventComm::AMI_PushConsumerHandler::push_reply_stub (
  TAO_InputCDR &_tao_in, 
  Messaging::ReplyHandler_ptr _tao_reply_handler,
  CORBA::ULong reply_status
  ACE_ENV_ARG_DECL)
{
  // Retrieve Reply Handler object.
  FtRtecEventComm::AMI_PushConsumerHandler_var _tao_reply_handler_object =
    FtRtecEventComm::AMI_PushConsumerHandler::_narrow (_tao_reply_handler ACE_ENV_ARG_PARAMETER);
  ACE_CHECK;
  
  // Exception handling
  switch (reply_status)
  {
    case TAO_AMI_REPLY_OK:
    {
      // Demarshall all the arguments.
      // Invoke the call back method.
      _tao_reply_handler_object->push (
          
          ACE_ENV_SINGLE_ARG_PARAMETER
        );
      ACE_CHECK;
      break;
    }
    case TAO_AMI_REPLY_USER_EXCEPTION:
    case TAO_AMI_REPLY_SYSTEM_EXCEPTION:
    {
      const ACE_Message_Block* cdr = _tao_in.start ();
      
      AMI_PushConsumerExceptionHolder_var exception_holder_var;
      ACE_NEW (
          exception_holder_var,
          OBV_FtRtecEventComm::_tao_AMI_PushConsumerExceptionHolder ()
        );
      
      CORBA::OctetSeq _tao_marshaled_exception (
          cdr->length (),
          cdr->length (),
          (unsigned char*) cdr->rd_ptr (),
          0
        );
      exception_holder_var->marshaled_exception (_tao_marshaled_exception);
      
      if (reply_status == TAO_AMI_REPLY_SYSTEM_EXCEPTION)
        exception_holder_var->is_system_exception (1);
      else
        exception_holder_var->is_system_exception (0);
      
      exception_holder_var->byte_order (_tao_in.byte_order ());
      
      _tao_reply_handler_object->push_excep (
          exception_holder_var ACE_ENV_ARG_PARAMETER
        );
      ACE_CHECK;
      break;
    }
    case TAO_AMI_REPLY_NOT_OK:
      // @@ Michael: Not even the spec mentions this case.
      //             We have to think about this case.
      break;
  }
}



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

void FtRtecEventComm::AMI_PushConsumerHandler::push_excep (
    ::FtRtecEventComm::AMI_PushConsumerExceptionHolder * excep_holder
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_AMI_PushConsumerHandler_Proxy_Broker_ == 0)
    {
      FtRtecEventComm_AMI_PushConsumerHandler_setup_collocation ();
    }
  
  TAO::Arg_Traits< void>::ret_val _tao_retval;
  TAO::Arg_Traits< ::FtRtecEventComm::AMI_PushConsumerExceptionHolder>::in_arg_val _tao_excep_holder (excep_holder);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_excep_holder
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      2,
      "push_excep",
      10,
      this->the_TAO_AMI_PushConsumerHandler_Proxy_Broker_
    );
  
  _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
  ACE_CHECK;
}

FtRtecEventComm::AMI_PushConsumerHandler::AMI_PushConsumerHandler (void)
 : the_TAO_AMI_PushConsumerHandler_Proxy_Broker_ (0)
{
  this->FtRtecEventComm_AMI_PushConsumerHandler_setup_collocation ();
}

void
FtRtecEventComm::AMI_PushConsumerHandler::FtRtecEventComm_AMI_PushConsumerHandler_setup_collocation ()
{
  if (::FtRtecEventComm__TAO_AMI_PushConsumerHandler_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_AMI_PushConsumerHandler_Proxy_Broker_ =
        ::FtRtecEventComm__TAO_AMI_PushConsumerHandler_Proxy_Broker_Factory_function_pointer (this);
    }
  
  this->Messaging_ReplyHandler_setup_collocation ();
}

FtRtecEventComm::AMI_PushConsumerHandler::~AMI_PushConsumerHandler (void)
{}

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

FtRtecEventComm::AMI_PushConsumerHandler_ptr
FtRtecEventComm::AMI_PushConsumerHandler::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<AMI_PushConsumerHandler>::narrow (
        _tao_objref,
        "IDL:AMI_PushConsumerHandler:1.0",
        FtRtecEventComm__TAO_AMI_PushConsumerHandler_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

FtRtecEventComm::AMI_PushConsumerHandler_ptr
FtRtecEventComm::AMI_PushConsumerHandler::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<AMI_PushConsumerHandler>::unchecked_narrow (
        _tao_objref,
        "IDL:AMI_PushConsumerHandler:1.0",
        FtRtecEventComm__TAO_AMI_PushConsumerHandler_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

FtRtecEventComm::AMI_PushConsumerHandler_ptr
FtRtecEventComm::AMI_PushConsumerHandler::_duplicate (AMI_PushConsumerHandler_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

CORBA::Boolean
FtRtecEventComm::AMI_PushConsumerHandler::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:ReplyHandler:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:AMI_PushConsumerHandler: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* FtRtecEventComm::AMI_PushConsumerHandler::_interface_repository_id (void) const
{
  return "IDL:AMI_PushConsumerHandler:1.0";
}

CORBA::Boolean
FtRtecEventComm::AMI_PushConsumerHandler::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

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

static const CORBA::Long _oc_FtRtecEventComm_AMI_PushConsumerHandler[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  32,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x414d495f), 
  ACE_NTOHL (0x50757368), 
  ACE_NTOHL (0x436f6e73), 
  ACE_NTOHL (0x756d6572), 
  ACE_NTOHL (0x48616e64), 
  ACE_NTOHL (0x6c65723a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:AMI_PushConsumerHandler:1.0
    24,
  ACE_NTOHL (0x414d495f), 
  ACE_NTOHL (0x50757368), 
  ACE_NTOHL (0x436f6e73), 
  ACE_NTOHL (0x756d6572), 
  ACE_NTOHL (0x48616e64), 
  ACE_NTOHL (0x6c657200),  // name = AMI_PushConsumerHandler
  };

static CORBA::TypeCode _tc_TAO_tc_FtRtecEventComm_AMI_PushConsumerHandler (
    CORBA::tk_objref,
    sizeof (_oc_FtRtecEventComm_AMI_PushConsumerHandler),
    (char *) &_oc_FtRtecEventComm_AMI_PushConsumerHandler,
    0,
    sizeof (FtRtecEventComm::AMI_PushConsumerHandler)
  );

namespace FtRtecEventComm
{
  ::CORBA::TypeCode_ptr _tc_AMI_PushConsumerHandler =
    &_tc_TAO_tc_FtRtecEventComm_AMI_PushConsumerHandler;
}

// TAO_IDL - Generated from
// be/be_visitor_valuetype/valuetype_obv_cs.cpp:58

OBV_FtRtecEventComm::AMI_PushConsumerExceptionHolder::AMI_PushConsumerExceptionHolder (void)
{}

OBV_FtRtecEventComm::AMI_PushConsumerExceptionHolder::~AMI_PushConsumerExceptionHolder (void)
{}

CORBA::Boolean
OBV_FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_marshal__FtRtecEventComm_AMI_PushConsumerExceptionHolder (TAO_OutputCDR &strm)
{
  return _tao_marshal_state (strm);
}

CORBA::Boolean
OBV_FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_unmarshal__FtRtecEventComm_AMI_PushConsumerExceptionHolder (TAO_InputCDR &strm)
{
  return _tao_unmarshal_state (strm);
}OBV_FtRtecEventComm::_tao_AMI_PushConsumerExceptionHolder::_tao_AMI_PushConsumerExceptionHolder () { }

OBV_FtRtecEventComm::_tao_AMI_PushConsumerExceptionHolder::~_tao_AMI_PushConsumerExceptionHolder () { }

void 
OBV_FtRtecEventComm::_tao_AMI_PushConsumerExceptionHolder::raise_push(ACE_ENV_SINGLE_ARG_DECL)
{
  
  static TAO::Exception_Data exceptions_data [] = 
  {
    {
      "IDL:FtRtecEventComm/InvalidObjectID:1.0",
      FtRtecEventComm::InvalidObjectID::_alloc,
      FtRtecEventComm::_tc_InvalidObjectID
    }
  };

  CORBA::ULong exceptions_count = 1;

  TAO_Messaging_Helper::exception_holder_raise (
    exceptions_data,
    exceptions_count,
    this->marshaled_exception ().get_buffer (),
    this->marshaled_exception ().length (),
    this->byte_order (),
    this->is_system_exception ()
    ACE_ENV_ARG_PARAMETER);
}



// TAO_IDL - Generated from 
// be/be_visitor_sequence/any_op_cs.cpp:54

// Copying insertion.
void operator<<= (
    CORBA::Any &_tao_any,
    const FtRtecEventComm::ObjectId &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<FtRtecEventComm::ObjectId>::insert_copy (
      _tao_any,
      FtRtecEventComm::ObjectId::_tao_any_destructor,
      FtRtecEventComm::_tc_ObjectId,
      _tao_elem
    );
}

// Non-copying insertion.
void operator<<= (
    CORBA::Any &_tao_any,
    FtRtecEventComm::ObjectId *_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<FtRtecEventComm::ObjectId>::insert (
      _tao_any,
      FtRtecEventComm::ObjectId::_tao_any_destructor,
      FtRtecEventComm::_tc_ObjectId,
      _tao_elem
    );
}

// Extraction to non-const pointer (deprecated).
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    FtRtecEventComm::ObjectId *&_tao_elem
  )
{
  return _tao_any >>= const_cast<
      const FtRtecEventComm::ObjectId *&> (
      _tao_elem
    );
}

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const FtRtecEventComm::ObjectId *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<FtRtecEventComm::ObjectId>::extract (
        _tao_any,
        FtRtecEventComm::ObjectId::_tao_any_destructor,
        FtRtecEventComm::_tc_ObjectId,
        _tao_elem
      );
}

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

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Dual_Impl_T<FtRtecEventComm::InvalidObjectID>::demarshal_value (
    TAO_InputCDR & cdr
  )
{
  CORBA::String_var id;
  
  if ((cdr >> id.out ()) == 0)
    {
      return 0;
    }
  
  ACE_TRY_NEW_ENV
    {
      this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER);
      ACE_TRY_CHECK;
    }
  ACE_CATCHANY
    {
      return 0;
    }
  ACE_ENDTRY;
  
  return 1;
}

// Copying insertion.
void operator<<= (
    CORBA::Any &_tao_any,
    const FtRtecEventComm::InvalidObjectID &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<FtRtecEventComm::InvalidObjectID>::insert_copy (
      _tao_any,
      FtRtecEventComm::InvalidObjectID::_tao_any_destructor,
      FtRtecEventComm::_tc_InvalidObjectID,
      _tao_elem
    );
}

// Non-copying insertion.
void operator<<= (
    CORBA::Any &_tao_any,
    FtRtecEventComm::InvalidObjectID *_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<FtRtecEventComm::InvalidObjectID>::insert (
      _tao_any,
      FtRtecEventComm::InvalidObjectID::_tao_any_destructor,
      FtRtecEventComm::_tc_InvalidObjectID,
      _tao_elem
    );
}

// Extraction to non-const pointer (deprecated).
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    FtRtecEventComm::InvalidObjectID *&_tao_elem
  )
{
  return _tao_any >>= const_cast<
      const FtRtecEventComm::InvalidObjectID *&> (
      _tao_elem
    );
}

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const FtRtecEventComm::InvalidObjectID *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<FtRtecEventComm::InvalidObjectID>::extract (
        _tao_any,
        FtRtecEventComm::InvalidObjectID::_tao_any_destructor,
        FtRtecEventComm::_tc_InvalidObjectID,
        _tao_elem
      );
}

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

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Impl_T<FtRtecEventComm::PushConsumer>::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,
    FtRtecEventComm::PushConsumer_ptr _tao_elem
  )
{
  FtRtecEventComm::PushConsumer_ptr _tao_objptr =
    FtRtecEventComm::PushConsumer::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

// Non-copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    FtRtecEventComm::PushConsumer_ptr *_tao_elem
  )
{
  TAO::Any_Impl_T<FtRtecEventComm::PushConsumer>::insert (
      _tao_any,
      FtRtecEventComm::PushConsumer::_tao_any_destructor,
      FtRtecEventComm::_tc_PushConsumer,
      *_tao_elem
    );
}

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    FtRtecEventComm::PushConsumer_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<FtRtecEventComm::PushConsumer>::extract (
        _tao_any,
        FtRtecEventComm::PushConsumer::_tao_any_destructor,
        FtRtecEventComm::_tc_PushConsumer,
        _tao_elem
      );
}

// TAO_IDL - Generated from
// be/be_visitor_valuetype/any_op_cs.cpp:57

template<>
CORBA::Boolean
TAO::Any_Impl_T<FtRtecEventComm::AMI_PushConsumerExceptionHolder>::to_value (
    CORBA::ValueBase *&_tao_elem
  ) const
{
  CORBA::add_ref (this->value_);
  _tao_elem = this->value_;
  return 1;
}
// Copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    FtRtecEventComm::AMI_PushConsumerExceptionHolder *_tao_elem
  )
{
  CORBA::add_ref (_tao_elem);
  _tao_any <<= &_tao_elem;
}

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

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    FtRtecEventComm::AMI_PushConsumerExceptionHolder *&_tao_elem
  )
{
  return
    TAO::Any_Impl_T<FtRtecEventComm::AMI_PushConsumerExceptionHolder>::extract (
        _tao_any,
        FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_any_destructor,
        FtRtecEventComm::_tc_AMI_PushConsumerExceptionHolder,
        _tao_elem
      );
}



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

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Impl_T<FtRtecEventComm::AMI_PushConsumerHandler>::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,
    FtRtecEventComm::AMI_PushConsumerHandler_ptr _tao_elem
  )
{
  FtRtecEventComm::AMI_PushConsumerHandler_ptr _tao_objptr =
    FtRtecEventComm::AMI_PushConsumerHandler::_duplicate (_tao_elem);
  _tao_any <<= &_tao_objptr;
}

// Non-copying insertion.
void
operator<<= (
    CORBA::Any &_tao_any,
    FtRtecEventComm::AMI_PushConsumerHandler_ptr *_tao_elem
  )
{
  TAO::Any_Impl_T<FtRtecEventComm::AMI_PushConsumerHandler>::insert (
      _tao_any,
      FtRtecEventComm::AMI_PushConsumerHandler::_tao_any_destructor,
      FtRtecEventComm::_tc_AMI_PushConsumerHandler,
      *_tao_elem
    );
}

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    FtRtecEventComm::AMI_PushConsumerHandler_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<FtRtecEventComm::AMI_PushConsumerHandler>::extract (
        _tao_any,
        FtRtecEventComm::AMI_PushConsumerHandler::_tao_any_destructor,
        FtRtecEventComm::_tc_AMI_PushConsumerHandler,
        _tao_elem
      );
}

// TAO_IDL - Generated from
// be/be_visitor_sequence/cdr_op_cs.cpp:96

#if !defined _TAO_CDR_OP_FtRtecEventComm_ObjectId_CPP_
#define _TAO_CDR_OP_FtRtecEventComm_ObjectId_CPP_

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const FtRtecEventComm::ObjectId &_tao_sequence
  )
{
  const CORBA::ULong _tao_seq_len = _tao_sequence.length ();
  
  if (strm << _tao_seq_len)
    {
      // Encode all elements.
      
#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
      {
        TAO_Unbounded_Sequence<CORBA::Octet> *oseq = 
          static_cast<TAO_Unbounded_Sequence<CORBA::Octet> *> ((FtRtecEventComm::ObjectId *)&_tao_sequence);
        if (oseq->mb ())
          return strm.write_octet_array_mb (oseq->mb ());
        else
          return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
      }
      
#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
      return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
    
#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
    }
  
  return 0;
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    FtRtecEventComm::ObjectId &_tao_sequence
  )
{
  CORBA::ULong _tao_seq_len;
  
  if (strm >> _tao_seq_len)
    {
      // Add a check to the length of the sequence
      // to make sure it does not exceed the length
      // of the stream. (See bug 58.)
      if (_tao_seq_len > strm.length ())
        {
          return 0;
        }
      
      // Set the length of the sequence.
      _tao_sequence.length (_tao_seq_len);
      
      // If length is 0 we return true.
      if (0 >= _tao_seq_len) 
        {
          return 1;
        }
      
      // Retrieve all the elements.
      
#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
      if (ACE_BIT_DISABLED (strm.start ()->flags (),
      ACE_Message_Block::DONT_DELETE))
      {
        TAO_ORB_Core* orb_core = strm.orb_core ();
        if (orb_core != 0 &&
        strm.orb_core ()->resource_factory ()->
        input_cdr_allocator_type_locked () == 1)
        {
          TAO_Unbounded_Sequence<CORBA::Octet> *oseq = 
            static_cast<TAO_Unbounded_Sequence<CORBA::Octet> *> (&_tao_sequence);
          oseq->replace (_tao_seq_len, strm.start ());
          oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len);
          strm.skip_bytes (_tao_seq_len);
          return 1;
        }
      }
      return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
      return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
    
#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
    
    }
  
  return 0;
}

#endif /* _TAO_CDR_OP_FtRtecEventComm_ObjectId_CPP_ */

// TAO_IDL - Generated from
// be/be_visitor_exception/cdr_op_cs.cpp:60

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const FtRtecEventComm::InvalidObjectID &_tao_aggregate
  )
{
  // First marshal the repository ID.
  if (strm << _tao_aggregate._rep_id ())
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

CORBA::Boolean operator>> (
    TAO_InputCDR &,
    FtRtecEventComm::InvalidObjectID&
  )
{
  return 1;
}

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

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

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

// TAO_IDL - Generated from
// be/be_valuetype.cpp:490

void
CORBA::add_ref (FtRtecEventComm::AMI_PushConsumerExceptionHolder * vt)
{
  if (vt != 0)
    {
      vt->_add_ref ();
    }
}

void
CORBA::remove_ref (FtRtecEventComm::AMI_PushConsumerExceptionHolder * vt)
{
  if (vt != 0)
    {
      vt->_remove_ref ();
    }
}

// TAO_IDL - Generated from
// be/be_visitor_valuetype/cdr_op_cs.cpp:73

CORBA::Boolean
operator<< (
    TAO_OutputCDR &strm,
    const FtRtecEventComm::AMI_PushConsumerExceptionHolder *_tao_valuetype
  )
{
  return
    CORBA::ValueBase::_tao_marshal (
        strm,
        const_cast<
            FtRtecEventComm::AMI_PushConsumerExceptionHolder *> (
            _tao_valuetype
          ),
        (ptrdiff_t) &FtRtecEventComm::AMI_PushConsumerExceptionHolder::_downcast
      );
}

CORBA::Boolean
operator>> (
    TAO_InputCDR &strm,
    FtRtecEventComm::AMI_PushConsumerExceptionHolder *&_tao_valuetype
  )
{
  return FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_unmarshal (strm, _tao_valuetype);
}

// TAO_IDL - Generated from
// be/be_visitor_valuetype/marshal_cs.cpp:44

CORBA::Boolean
OBV_FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_marshal_state (TAO_OutputCDR &strm)
{
  if (! this->_tao_marshal__Messaging_ExceptionHolder (strm))
    {
      return 0;
    }
  
  return (
      1
    );
}

CORBA::Boolean
OBV_FtRtecEventComm::AMI_PushConsumerExceptionHolder::_tao_unmarshal_state (TAO_InputCDR &strm)
{
  if (! this->_tao_unmarshal__Messaging_ExceptionHolder (strm))
    {
      return 0;
    }
  
  return (
    1
  );
}

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

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

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

