// -*- 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 "FT_ReplicationManagerC.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/Any_Dual_Impl_T.h"
#include "tao/Basic_Arguments.h"
#include "tao/Object_Argument_T.h"
#include "tao/Special_Basic_Arguments.h"
#include "tao/UB_String_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 "FT_ReplicationManagerC.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_FT_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_arg_traits.cpp:379

#if !defined (_COSNAMING_NAME__ARG_TRAITS_CS_)
#define _COSNAMING_NAME__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNaming::Name>
    : public
        Var_Size_Arg_Traits_T<
            CosNaming::Name,
            CosNaming::Name_var,
            CosNaming::Name_out
          >
  {
  };

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

#if !defined (_COSNAMING_BINDING__ARG_TRAITS_CS_)
#define _COSNAMING_BINDING__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNaming::Binding>
    : public
        Var_Size_Arg_Traits_T<
            CosNaming::Binding,
            CosNaming::Binding_var,
            CosNaming::Binding_out
          >
  {
  };

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

#if !defined (_COSNAMING_BINDINGLIST__ARG_TRAITS_CS_)
#define _COSNAMING_BINDINGLIST__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNaming::BindingList>
    : public
        Var_Size_Arg_Traits_T<
            CosNaming::BindingList,
            CosNaming::BindingList_var,
            CosNaming::BindingList_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSNAMING_BINDINGITERATOR__ARG_TRAITS_CS_)
#define _COSNAMING_BINDINGITERATOR__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNaming::BindingIterator>
    : public
        Object_Arg_Traits_T<
            CosNaming::BindingIterator_ptr,
            CosNaming::BindingIterator_var,
            CosNaming::BindingIterator_out,
            TAO::Objref_Traits<CosNaming::BindingIterator>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSNAMING_NAMINGCONTEXT__ARG_TRAITS_CS_)
#define _COSNAMING_NAMINGCONTEXT__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNaming::NamingContext>
    : public
        Object_Arg_Traits_T<
            CosNaming::NamingContext_ptr,
            CosNaming::NamingContext_var,
            CosNaming::NamingContext_out,
            TAO::Objref_Traits<CosNaming::NamingContext>
          >
  {
  };

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

#if !defined (_PORTABLEGROUP_PROPERTIES__ARG_TRAITS_CS_)
#define _PORTABLEGROUP_PROPERTIES__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<PortableGroup::Properties>
    : public
        Var_Size_Arg_Traits_T<
            PortableGroup::Properties,
            PortableGroup::Properties_var,
            PortableGroup::Properties_out
          >
  {
  };

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

#if !defined (_PORTABLEGROUP_FACTORYINFO__ARG_TRAITS_CS_)
#define _PORTABLEGROUP_FACTORYINFO__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<PortableGroup::FactoryInfo>
    : public
        Var_Size_Arg_Traits_T<
            PortableGroup::FactoryInfo,
            PortableGroup::FactoryInfo_var,
            PortableGroup::FactoryInfo_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_PORTABLEGROUP_FACTORYREGISTRY__ARG_TRAITS_CS_)
#define _PORTABLEGROUP_FACTORYREGISTRY__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<PortableGroup::FactoryRegistry>
    : public
        Object_Arg_Traits_T<
            PortableGroup::FactoryRegistry_ptr,
            PortableGroup::FactoryRegistry_var,
            PortableGroup::FactoryRegistry_out,
            TAO::Objref_Traits<PortableGroup::FactoryRegistry>
          >
  {
  };

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

#if !defined (_COSNOTIFICATION_PROPERTYSEQ__ARG_TRAITS_CS_)
#define _COSNOTIFICATION_PROPERTYSEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotification::PropertySeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotification::PropertySeq,
            CosNotification::PropertySeq_var,
            CosNotification::PropertySeq_out
          >
  {
  };

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

#if !defined (_COSNOTIFICATION_EVENTTYPESEQ__ARG_TRAITS_CS_)
#define _COSNOTIFICATION_EVENTTYPESEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotification::EventTypeSeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotification::EventTypeSeq,
            CosNotification::EventTypeSeq_var,
            CosNotification::EventTypeSeq_out
          >
  {
  };

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

#if !defined (_COSNOTIFICATION_NAMEDPROPERTYRANGESEQ__ARG_TRAITS_CS_)
#define _COSNOTIFICATION_NAMEDPROPERTYRANGESEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotification::NamedPropertyRangeSeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotification::NamedPropertyRangeSeq,
            CosNotification::NamedPropertyRangeSeq_var,
            CosNotification::NamedPropertyRangeSeq_out
          >
  {
  };

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

#if !defined (_COSNOTIFICATION_STRUCTUREDEVENT__ARG_TRAITS_CS_)
#define _COSNOTIFICATION_STRUCTUREDEVENT__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotification::StructuredEvent>
    : public
        Var_Size_Arg_Traits_T<
            CosNotification::StructuredEvent,
            CosNotification::StructuredEvent_var,
            CosNotification::StructuredEvent_out
          >
  {
  };

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

#if !defined (_COSNOTIFICATION_EVENTBATCH__ARG_TRAITS_CS_)
#define _COSNOTIFICATION_EVENTBATCH__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotification::EventBatch>
    : public
        Var_Size_Arg_Traits_T<
            CosNotification::EventBatch,
            CosNotification::EventBatch_var,
            CosNotification::EventBatch_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSNOTIFYCOMM_NOTIFYSUBSCRIBE__ARG_TRAITS_CS_)
#define _COSNOTIFYCOMM_NOTIFYSUBSCRIBE__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyComm::NotifySubscribe>
    : public
        Object_Arg_Traits_T<
            CosNotifyComm::NotifySubscribe_ptr,
            CosNotifyComm::NotifySubscribe_var,
            CosNotifyComm::NotifySubscribe_out,
            TAO::Objref_Traits<CosNotifyComm::NotifySubscribe>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSNOTIFYCOMM_STRUCTUREDPUSHCONSUMER__ARG_TRAITS_CS_)
#define _COSNOTIFYCOMM_STRUCTUREDPUSHCONSUMER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyComm::StructuredPushConsumer>
    : public
        Object_Arg_Traits_T<
            CosNotifyComm::StructuredPushConsumer_ptr,
            CosNotifyComm::StructuredPushConsumer_var,
            CosNotifyComm::StructuredPushConsumer_out,
            TAO::Objref_Traits<CosNotifyComm::StructuredPushConsumer>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSNOTIFYCOMM_SEQUENCEPUSHCONSUMER__ARG_TRAITS_CS_)
#define _COSNOTIFYCOMM_SEQUENCEPUSHCONSUMER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyComm::SequencePushConsumer>
    : public
        Object_Arg_Traits_T<
            CosNotifyComm::SequencePushConsumer_ptr,
            CosNotifyComm::SequencePushConsumer_var,
            CosNotifyComm::SequencePushConsumer_out,
            TAO::Objref_Traits<CosNotifyComm::SequencePushConsumer>
          >
  {
  };

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

#if !defined (_COSNOTIFYFILTER_CONSTRAINTIDSEQ__ARG_TRAITS_CS_)
#define _COSNOTIFYFILTER_CONSTRAINTIDSEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyFilter::ConstraintIDSeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotifyFilter::ConstraintIDSeq,
            CosNotifyFilter::ConstraintIDSeq_var,
            CosNotifyFilter::ConstraintIDSeq_out
          >
  {
  };

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

#if !defined (_COSNOTIFYFILTER_CONSTRAINTEXPSEQ__ARG_TRAITS_CS_)
#define _COSNOTIFYFILTER_CONSTRAINTEXPSEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyFilter::ConstraintExpSeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotifyFilter::ConstraintExpSeq,
            CosNotifyFilter::ConstraintExpSeq_var,
            CosNotifyFilter::ConstraintExpSeq_out
          >
  {
  };

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

#if !defined (_COSNOTIFYFILTER_CONSTRAINTINFOSEQ__ARG_TRAITS_CS_)
#define _COSNOTIFYFILTER_CONSTRAINTINFOSEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyFilter::ConstraintInfoSeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotifyFilter::ConstraintInfoSeq,
            CosNotifyFilter::ConstraintInfoSeq_var,
            CosNotifyFilter::ConstraintInfoSeq_out
          >
  {
  };

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

#if !defined (_COSNOTIFYFILTER_MAPPINGCONSTRAINTPAIRSEQ__ARG_TRAITS_CS_)
#define _COSNOTIFYFILTER_MAPPINGCONSTRAINTPAIRSEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyFilter::MappingConstraintPairSeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotifyFilter::MappingConstraintPairSeq,
            CosNotifyFilter::MappingConstraintPairSeq_var,
            CosNotifyFilter::MappingConstraintPairSeq_out
          >
  {
  };

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

#if !defined (_COSNOTIFYFILTER_MAPPINGCONSTRAINTINFOSEQ__ARG_TRAITS_CS_)
#define _COSNOTIFYFILTER_MAPPINGCONSTRAINTINFOSEQ__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyFilter::MappingConstraintInfoSeq>
    : public
        Var_Size_Arg_Traits_T<
            CosNotifyFilter::MappingConstraintInfoSeq,
            CosNotifyFilter::MappingConstraintInfoSeq_var,
            CosNotifyFilter::MappingConstraintInfoSeq_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSNOTIFYFILTER_FILTER__ARG_TRAITS_CS_)
#define _COSNOTIFYFILTER_FILTER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<CosNotifyFilter::Filter>
    : public
        Object_Arg_Traits_T<
            CosNotifyFilter::Filter_ptr,
            CosNotifyFilter::Filter_var,
            CosNotifyFilter::Filter_out,
            TAO::Objref_Traits<CosNotifyFilter::Filter>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_FT_FAULTNOTIFIER__ARG_TRAITS_CS_)
#define _FT_FAULTNOTIFIER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<FT::FaultNotifier>
    : public
        Object_Arg_Traits_T<
            FT::FaultNotifier_ptr,
            FT::FaultNotifier_var,
            FT::FaultNotifier_out,
            TAO::Objref_Traits<FT::FaultNotifier>
          >
  {
  };

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

#if !defined (_FT_STATE__ARG_TRAITS_CS_)
#define _FT_STATE__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_FT_Export Arg_Traits<FT::State>
    : public
        Var_Size_Arg_Traits_T<
            FT::State,
            FT::State_var,
            FT::State_out
          >
  {
  };

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


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

FT::InterfaceNotFound::InterfaceNotFound (void)
  : CORBA::UserException (
        "IDL:omg.org/FT/InterfaceNotFound:1.0",
        "InterfaceNotFound"
      )
{
}

FT::InterfaceNotFound::~InterfaceNotFound (void)
{
}

FT::InterfaceNotFound::InterfaceNotFound (const ::FT::InterfaceNotFound &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
}

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

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

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

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

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

void FT::InterfaceNotFound::_raise (void) const
{
  TAO_RAISE (*this);
}

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

void FT::InterfaceNotFound::_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 FT::InterfaceNotFound::_type (void) const
{
  return ::FT::_tc_InterfaceNotFound;
}

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

static const CORBA::Long _oc_FT_InterfaceNotFound[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  37,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x46542f49), 
  ACE_NTOHL (0x6e746572), 
  ACE_NTOHL (0x66616365), 
  ACE_NTOHL (0x4e6f7446), 
  ACE_NTOHL (0x6f756e64), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/FT/InterfaceNotFound:1.0
    18,
  ACE_NTOHL (0x496e7465), 
  ACE_NTOHL (0x72666163), 
  ACE_NTOHL (0x654e6f74), 
  ACE_NTOHL (0x466f756e), 
  ACE_NTOHL (0x64000000),  // name = InterfaceNotFound
  0, // member count
  };

static CORBA::TypeCode _tc_TAO_tc_FT_InterfaceNotFound (
    CORBA::tk_except,
    sizeof (_oc_FT_InterfaceNotFound),
    (char *) &_oc_FT_InterfaceNotFound,
    0,
    sizeof (FT::InterfaceNotFound)
  );

namespace FT
{
  ::CORBA::TypeCode_ptr _tc_InterfaceNotFound =
    &_tc_TAO_tc_FT_InterfaceNotFound;
}

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

// Traits specializations for FT::ReplicationManager.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
FT::ReplicationManager_ptr
TAO::Objref_Traits<FT::ReplicationManager>::tao_duplicate (
    FT::ReplicationManager_ptr p
  )
{
  return FT::ReplicationManager::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<FT::ReplicationManager>::tao_release (
    FT::ReplicationManager_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
FT::ReplicationManager_ptr
TAO::Objref_Traits<FT::ReplicationManager>::tao_nil (void)
{
  return FT::ReplicationManager::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<FT::ReplicationManager>::tao_marshal (
    FT::ReplicationManager_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

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

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

void FT::ReplicationManager::register_fault_notifier (
    ::FT::FaultNotifier_ptr fault_notifier
    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_ReplicationManager_Proxy_Broker_ == 0)
    {
      FT_ReplicationManager_setup_collocation ();
    }
  
  TAO::Arg_Traits< void>::ret_val _tao_retval;
  TAO::Arg_Traits< ::FT::FaultNotifier>::in_arg_val _tao_fault_notifier (fault_notifier);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_fault_notifier
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      2,
      "register_fault_notifier",
      23,
      this->the_TAO_ReplicationManager_Proxy_Broker_
    );
  
  _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
  ACE_CHECK;
}

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

::FT::FaultNotifier_ptr FT::ReplicationManager::get_fault_notifier (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::FT::InterfaceNotFound
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_ReplicationManager_Proxy_Broker_ == 0)
    {
      FT_ReplicationManager_setup_collocation ();
    }
  
  TAO::Arg_Traits< ::FT::FaultNotifier>::ret_val _tao_retval;
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };
  
  static TAO::Exception_Data
  _tao_FT_ReplicationManager_get_fault_notifier_exceptiondata [] = 
    {
      {
        "IDL:omg.org/FT/InterfaceNotFound:1.0",
        FT::InterfaceNotFound::_alloc,
        FT::_tc_InterfaceNotFound
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "get_fault_notifier",
      18,
      this->the_TAO_ReplicationManager_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_FT_ReplicationManager_get_fault_notifier_exceptiondata,
      1
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

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

::PortableGroup::FactoryRegistry_ptr FT::ReplicationManager::get_factory_registry (
    const ::PortableGroup::Criteria & selection_criteria
    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_ReplicationManager_Proxy_Broker_ == 0)
    {
      FT_ReplicationManager_setup_collocation ();
    }
  
  TAO::Arg_Traits< ::PortableGroup::FactoryRegistry>::ret_val _tao_retval;
  TAO::Arg_Traits< ::PortableGroup::Criteria>::in_arg_val _tao_selection_criteria (selection_criteria);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_selection_criteria
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      2,
      "get_factory_registry",
      20,
      this->the_TAO_ReplicationManager_Proxy_Broker_
    );
  
  _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

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

void FT::ReplicationManager::shutdown (
    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_ReplicationManager_Proxy_Broker_ == 0)
    {
      FT_ReplicationManager_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,
      "shutdown",
      8,
      this->the_TAO_ReplicationManager_Proxy_Broker_,
      TAO::TAO_ONEWAY_INVOCATION
    );
  
  _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER);
  ACE_CHECK;
}

FT::ReplicationManager::ReplicationManager (void)
 : the_TAO_ReplicationManager_Proxy_Broker_ (0)
{
  this->FT_ReplicationManager_setup_collocation ();
}

void
FT::ReplicationManager::FT_ReplicationManager_setup_collocation ()
{
  if (::FT__TAO_ReplicationManager_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_ReplicationManager_Proxy_Broker_ =
        ::FT__TAO_ReplicationManager_Proxy_Broker_Factory_function_pointer (this);
    }
  
  this->PortableGroup_PropertyManager_setup_collocation ();
  this->FT_FTObjectGroupManager_setup_collocation ();
  this->PortableGroup_GenericFactory_setup_collocation ();
}

FT::ReplicationManager::~ReplicationManager (void)
{}

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

FT::ReplicationManager_ptr
FT::ReplicationManager::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<ReplicationManager>::narrow (
        _tao_objref,
        "IDL:omg.org/FT/ReplicationManager:1.0",
        FT__TAO_ReplicationManager_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

FT::ReplicationManager_ptr
FT::ReplicationManager::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<ReplicationManager>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/FT/ReplicationManager:1.0",
        FT__TAO_ReplicationManager_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

FT::ReplicationManager_ptr
FT::ReplicationManager::_duplicate (ReplicationManager_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

CORBA::Boolean
FT::ReplicationManager::_is_a (
    const char *value
    ACE_ENV_ARG_DECL
  )
{
  if (
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/PortableGroup/PropertyManager:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/PortableGroup/ObjectGroupManager:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/FT/FTObjectGroupManager:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/PortableGroup/GenericFactory:1.0"
        ) ||
      !ACE_OS::strcmp (
          (char *)value,
          "IDL:omg.org/FT/ReplicationManager: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* FT::ReplicationManager::_interface_repository_id (void) const
{
  return "IDL:omg.org/FT/ReplicationManager:1.0";
}

CORBA::Boolean
FT::ReplicationManager::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

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

static const CORBA::Long _oc_FT_ReplicationManager[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  38,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x46542f52), 
  ACE_NTOHL (0x65706c69), 
  ACE_NTOHL (0x63617469), 
  ACE_NTOHL (0x6f6e4d61), 
  ACE_NTOHL (0x6e616765), 
  ACE_NTOHL (0x723a312e), 
  ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/FT/ReplicationManager:1.0
    19,
  ACE_NTOHL (0x5265706c), 
  ACE_NTOHL (0x69636174), 
  ACE_NTOHL (0x696f6e4d), 
  ACE_NTOHL (0x616e6167), 
  ACE_NTOHL (0x65720000),  // name = ReplicationManager
  };

static CORBA::TypeCode _tc_TAO_tc_FT_ReplicationManager (
    CORBA::tk_objref,
    sizeof (_oc_FT_ReplicationManager),
    (char *) &_oc_FT_ReplicationManager,
    0,
    sizeof (FT::ReplicationManager)
  );

namespace FT
{
  ::CORBA::TypeCode_ptr _tc_ReplicationManager =
    &_tc_TAO_tc_FT_ReplicationManager;
}

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

ACE_TEMPLATE_SPECIALIZATION
CORBA::Boolean
TAO::Any_Dual_Impl_T<FT::InterfaceNotFound>::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 FT::InterfaceNotFound &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<FT::InterfaceNotFound>::insert_copy (
      _tao_any,
      FT::InterfaceNotFound::_tao_any_destructor,
      FT::_tc_InterfaceNotFound,
      _tao_elem
    );
}

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

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

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

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

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

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

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    FT::ReplicationManager_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<FT::ReplicationManager>::extract (
        _tao_any,
        FT::ReplicationManager::_tao_any_destructor,
        FT::_tc_ReplicationManager,
        _tao_elem
      );
}

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

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

CORBA::Boolean operator>> (
    TAO_InputCDR &,
    FT::InterfaceNotFound&
  )
{
  return 1;
}

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

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

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

