// -*- 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 "CosLifeCycleC.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 "CosLifeCycleC.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 (_COSNAMING_NAME__ARG_TRAITS_CS_)
#define _COSNAMING_NAME__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_LifeCycle_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_LifeCycle_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_LifeCycle_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_LifeCycle_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_LifeCycle_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 (_COSLIFECYCLE_FACTORIES__ARG_TRAITS_CS_)
#define _COSLIFECYCLE_FACTORIES__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_LifeCycle_Export Arg_Traits<CosLifeCycle::Factories>
    : public
        Var_Size_Arg_Traits_T<
            CosLifeCycle::Factories,
            CosLifeCycle::Factories_var,
            CosLifeCycle::Factories_out
          >
  {
  };

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

#if !defined (_COSLIFECYCLE_CRITERIA__ARG_TRAITS_CS_)
#define _COSLIFECYCLE_CRITERIA__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_LifeCycle_Export Arg_Traits<CosLifeCycle::Criteria>
    : public
        Var_Size_Arg_Traits_T<
            CosLifeCycle::Criteria,
            CosLifeCycle::Criteria_var,
            CosLifeCycle::Criteria_out
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSLIFECYCLE_FACTORYFINDER__ARG_TRAITS_CS_)
#define _COSLIFECYCLE_FACTORYFINDER__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_LifeCycle_Export Arg_Traits<CosLifeCycle::FactoryFinder>
    : public
        Object_Arg_Traits_T<
            CosLifeCycle::FactoryFinder_ptr,
            CosLifeCycle::FactoryFinder_var,
            CosLifeCycle::FactoryFinder_out,
            TAO::Objref_Traits<CosLifeCycle::FactoryFinder>
          >
  {
  };

#endif /* end #if !defined */

#if !defined (_COSLIFECYCLE_LIFECYCLEOBJECT__ARG_TRAITS_CS_)
#define _COSLIFECYCLE_LIFECYCLEOBJECT__ARG_TRAITS_CS_
  
  ACE_TEMPLATE_SPECIALIZATION
  class TAO_LifeCycle_Export Arg_Traits<CosLifeCycle::LifeCycleObject>
    : public
        Object_Arg_Traits_T<
            CosLifeCycle::LifeCycleObject_ptr,
            CosLifeCycle::LifeCycleObject_var,
            CosLifeCycle::LifeCycleObject_out,
            TAO::Objref_Traits<CosLifeCycle::LifeCycleObject>
          >
  {
  };

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


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

static const CORBA::Long _oc_CosLifeCycle_Key[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  33,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f4b6579), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CosLifeCycle/Key:1.0
    4,
  ACE_NTOHL (0x4b657900),  // name = Key
    CORBA::tk_alias, // typecode kind for typedefs
  312, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    31,
    ACE_NTOHL (0x49444c3a), 
    ACE_NTOHL (0x6f6d672e), 
    ACE_NTOHL (0x6f72672f), 
    ACE_NTOHL (0x436f734e), 
    ACE_NTOHL (0x616d696e), 
    ACE_NTOHL (0x672f4e61), 
    ACE_NTOHL (0x6d653a31), 
    ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosNaming/Name:1.0
        5,
    ACE_NTOHL (0x4e616d65), 
    ACE_NTOHL (0x0),  // name = Name
        CORBA::tk_sequence, // typecode kind
    252, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      CORBA::tk_struct, // typecode kind
      236, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        40,
        ACE_NTOHL (0x49444c3a), 
        ACE_NTOHL (0x6f6d672e), 
        ACE_NTOHL (0x6f72672f), 
        ACE_NTOHL (0x436f734e), 
        ACE_NTOHL (0x616d696e), 
        ACE_NTOHL (0x672f4e61), 
        ACE_NTOHL (0x6d65436f), 
        ACE_NTOHL (0x6d706f6e), 
        ACE_NTOHL (0x656e743a), 
        ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CosNaming/NameComponent:1.0
                14,
        ACE_NTOHL (0x4e616d65), 
        ACE_NTOHL (0x436f6d70), 
        ACE_NTOHL (0x6f6e656e), 
        ACE_NTOHL (0x74000000),  // name = NameComponent
        2, // member count
                3,
        ACE_NTOHL (0x69640000),  // name = id
                CORBA::tk_alias, // typecode kind for typedefs
        64, // encapsulation length
          TAO_ENCAP_BYTE_ORDER, // byte order
          34,
          ACE_NTOHL (0x49444c3a), 
          ACE_NTOHL (0x6f6d672e), 
          ACE_NTOHL (0x6f72672f), 
          ACE_NTOHL (0x436f734e), 
          ACE_NTOHL (0x616d696e), 
          ACE_NTOHL (0x672f4973), 
          ACE_NTOHL (0x7472696e), 
          ACE_NTOHL (0x673a312e), 
          ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
                    8,
          ACE_NTOHL (0x49737472), 
          ACE_NTOHL (0x696e6700),  // name = Istring
                    CORBA::tk_string, 
          0U, // string length

        5,
        ACE_NTOHL (0x6b696e64), 
        ACE_NTOHL (0x0),  // name = kind
                CORBA::tk_alias, // typecode kind for typedefs
        64, // encapsulation length
          TAO_ENCAP_BYTE_ORDER, // byte order
          34,
          ACE_NTOHL (0x49444c3a), 
          ACE_NTOHL (0x6f6d672e), 
          ACE_NTOHL (0x6f72672f), 
          ACE_NTOHL (0x436f734e), 
          ACE_NTOHL (0x616d696e), 
          ACE_NTOHL (0x672f4973), 
          ACE_NTOHL (0x7472696e), 
          ACE_NTOHL (0x673a312e), 
          ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
                    8,
          ACE_NTOHL (0x49737472), 
          ACE_NTOHL (0x696e6700),  // name = Istring
                    CORBA::tk_string, 
          0U, // string length


      0U,


};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_Key (
    CORBA::tk_alias,
    sizeof (_oc_CosLifeCycle_Key),
    (char *) &_oc_CosLifeCycle_Key,
    0,
    sizeof (CosLifeCycle::Key)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_Key =
    &_tc_TAO_tc_CosLifeCycle_Key;
}

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

static const CORBA::Long _oc_CosLifeCycle_Factory[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  37,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f466163), 
  ACE_NTOHL (0x746f7279), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CosLifeCycle/Factory:1.0
    8,
  ACE_NTOHL (0x46616374), 
  ACE_NTOHL (0x6f727900),  // name = Factory
    CORBA::tk_objref,
  52, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    29,
    ACE_NTOHL (0x49444c3a), 
    ACE_NTOHL (0x6f6d672e), 
    ACE_NTOHL (0x6f72672f), 
    ACE_NTOHL (0x434f5242), 
    ACE_NTOHL (0x412f4f62), 
    ACE_NTOHL (0x6a656374), 
    ACE_NTOHL (0x3a312e30), 
    ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CORBA/Object:1.0
        7,
    ACE_NTOHL (0x4f626a65), 
    ACE_NTOHL (0x63740000),  // name = Object
    
};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_Factory (
    CORBA::tk_alias,
    sizeof (_oc_CosLifeCycle_Factory),
    (char *) &_oc_CosLifeCycle_Factory,
    0,
    sizeof (CosLifeCycle::Factory)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_Factory =
    &_tc_TAO_tc_CosLifeCycle_Factory;
}

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

#if !defined (_COSLIFECYCLE_FACTORIES_CS_)
#define _COSLIFECYCLE_FACTORIES_CS_

CosLifeCycle::Factories::Factories (void)
{}

CosLifeCycle::Factories::Factories (
    CORBA::ULong max
  )
  : TAO_Unbounded_Pseudo_Sequence<
        CosLifeCycle::Factory
      >
    (max)
{}

CosLifeCycle::Factories::Factories (
    CORBA::ULong max,
    CORBA::ULong length,
    CORBA::Object_ptr * buffer,
    CORBA::Boolean release
  )
  : TAO_Unbounded_Pseudo_Sequence<
        CosLifeCycle::Factory
      >
    (max, length, buffer, release)
{}

CosLifeCycle::Factories::Factories (
    const Factories &seq
  )
  : TAO_Unbounded_Pseudo_Sequence<
        CosLifeCycle::Factory
      >
    (seq)
{}

CosLifeCycle::Factories::~Factories (void)
{}

void CosLifeCycle::Factories::_tao_any_destructor (
    void * _tao_void_pointer
  )
{
  Factories * _tao_tmp_pointer =
    static_cast<Factories *> (_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_CosLifeCycle_Factories[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  39,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f466163), 
  ACE_NTOHL (0x746f7269), 
  ACE_NTOHL (0x65733a31), 
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosLifeCycle/Factories:1.0
    10,
  ACE_NTOHL (0x46616374), 
  ACE_NTOHL (0x6f726965), 
  ACE_NTOHL (0x73000000),  // name = Factories
    CORBA::tk_sequence, // typecode kind
  136, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    CORBA::tk_alias, // typecode kind for typedefs
    120, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      37,
      ACE_NTOHL (0x49444c3a), 
      ACE_NTOHL (0x6f6d672e), 
      ACE_NTOHL (0x6f72672f), 
      ACE_NTOHL (0x436f734c), 
      ACE_NTOHL (0x69666543), 
      ACE_NTOHL (0x79636c65), 
      ACE_NTOHL (0x2f466163), 
      ACE_NTOHL (0x746f7279), 
      ACE_NTOHL (0x3a312e30), 
      ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CosLifeCycle/Factory:1.0
            8,
      ACE_NTOHL (0x46616374), 
      ACE_NTOHL (0x6f727900),  // name = Factory
            CORBA::tk_objref,
      52, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        29,
        ACE_NTOHL (0x49444c3a), 
        ACE_NTOHL (0x6f6d672e), 
        ACE_NTOHL (0x6f72672f), 
        ACE_NTOHL (0x434f5242), 
        ACE_NTOHL (0x412f4f62), 
        ACE_NTOHL (0x6a656374), 
        ACE_NTOHL (0x3a312e30), 
        ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CORBA/Object:1.0
                7,
        ACE_NTOHL (0x4f626a65), 
        ACE_NTOHL (0x63740000),  // name = Object
        

    0U,

};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_Factories (
    CORBA::tk_alias,
    sizeof (_oc_CosLifeCycle_Factories),
    (char *) &_oc_CosLifeCycle_Factories,
    0,
    sizeof (CosLifeCycle::Factories)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_Factories =
    &_tc_TAO_tc_CosLifeCycle_Factories;
}

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

static const CORBA::Long _oc_CosLifeCycle_NameValuePair[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  43,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f4e616d), 
  ACE_NTOHL (0x6556616c), 
  ACE_NTOHL (0x75655061), 
  ACE_NTOHL (0x69723a31), 
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosLifeCycle/NameValuePair:1.0
    14,
  ACE_NTOHL (0x4e616d65), 
  ACE_NTOHL (0x56616c75), 
  ACE_NTOHL (0x65506169), 
  ACE_NTOHL (0x72000000),  // name = NameValuePair
  2, // member count
    5,
  ACE_NTOHL (0x6e616d65), 
  ACE_NTOHL (0x0),  // name = name
    CORBA::tk_alias, // typecode kind for typedefs
  64, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    34,
    ACE_NTOHL (0x49444c3a), 
    ACE_NTOHL (0x6f6d672e), 
    ACE_NTOHL (0x6f72672f), 
    ACE_NTOHL (0x436f734e), 
    ACE_NTOHL (0x616d696e), 
    ACE_NTOHL (0x672f4973), 
    ACE_NTOHL (0x7472696e), 
    ACE_NTOHL (0x673a312e), 
    ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
        8,
    ACE_NTOHL (0x49737472), 
    ACE_NTOHL (0x696e6700),  // name = Istring
        CORBA::tk_string, 
    0U, // string length

  6,
  ACE_NTOHL (0x76616c75), 
  ACE_NTOHL (0x65000000),  // name = value
    CORBA::tk_any,

};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_NameValuePair (
    CORBA::tk_struct,
    sizeof (_oc_CosLifeCycle_NameValuePair),
    (char *) &_oc_CosLifeCycle_NameValuePair,
    0,
    sizeof (CosLifeCycle::NameValuePair)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_NameValuePair =
    &_tc_TAO_tc_CosLifeCycle_NameValuePair;
}

// TAO_IDL - Generated from 
// be/be_visitor_structure/structure_cs.cpp:66

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

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

#if !defined (_COSLIFECYCLE_CRITERIA_CS_)
#define _COSLIFECYCLE_CRITERIA_CS_

CosLifeCycle::Criteria::Criteria (void)
{}

CosLifeCycle::Criteria::Criteria (
    CORBA::ULong max
  )
  : TAO_Unbounded_Sequence<
        CosLifeCycle::NameValuePair
      >
    (max)
{}

CosLifeCycle::Criteria::Criteria (
    CORBA::ULong max,
    CORBA::ULong length,
    CosLifeCycle::NameValuePair * buffer,
    CORBA::Boolean release
  )
  : TAO_Unbounded_Sequence<
        CosLifeCycle::NameValuePair
      >
    (max, length, buffer, release)
{}

CosLifeCycle::Criteria::Criteria (
    const Criteria &seq
  )
  : TAO_Unbounded_Sequence<
        CosLifeCycle::NameValuePair
      >
    (seq)
{}

CosLifeCycle::Criteria::~Criteria (void)
{}

void CosLifeCycle::Criteria::_tao_any_destructor (
    void * _tao_void_pointer
  )
{
  Criteria * _tao_tmp_pointer =
    static_cast<Criteria *> (_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_CosLifeCycle_Criteria[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  38,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f437269), 
  ACE_NTOHL (0x74657269), 
  ACE_NTOHL (0x613a312e), 
  ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosLifeCycle/Criteria:1.0
    9,
  ACE_NTOHL (0x43726974), 
  ACE_NTOHL (0x65726961), 
  ACE_NTOHL (0x0),  // name = Criteria
    CORBA::tk_sequence, // typecode kind
  192, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    CORBA::tk_struct, // typecode kind
    176, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      43,
      ACE_NTOHL (0x49444c3a), 
      ACE_NTOHL (0x6f6d672e), 
      ACE_NTOHL (0x6f72672f), 
      ACE_NTOHL (0x436f734c), 
      ACE_NTOHL (0x69666543), 
      ACE_NTOHL (0x79636c65), 
      ACE_NTOHL (0x2f4e616d), 
      ACE_NTOHL (0x6556616c), 
      ACE_NTOHL (0x75655061), 
      ACE_NTOHL (0x69723a31), 
      ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosLifeCycle/NameValuePair:1.0
            14,
      ACE_NTOHL (0x4e616d65), 
      ACE_NTOHL (0x56616c75), 
      ACE_NTOHL (0x65506169), 
      ACE_NTOHL (0x72000000),  // name = NameValuePair
      2, // member count
            5,
      ACE_NTOHL (0x6e616d65), 
      ACE_NTOHL (0x0),  // name = name
            CORBA::tk_alias, // typecode kind for typedefs
      64, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        34,
        ACE_NTOHL (0x49444c3a), 
        ACE_NTOHL (0x6f6d672e), 
        ACE_NTOHL (0x6f72672f), 
        ACE_NTOHL (0x436f734e), 
        ACE_NTOHL (0x616d696e), 
        ACE_NTOHL (0x672f4973), 
        ACE_NTOHL (0x7472696e), 
        ACE_NTOHL (0x673a312e), 
        ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
                8,
        ACE_NTOHL (0x49737472), 
        ACE_NTOHL (0x696e6700),  // name = Istring
                CORBA::tk_string, 
        0U, // string length

      6,
      ACE_NTOHL (0x76616c75), 
      ACE_NTOHL (0x65000000),  // name = value
            CORBA::tk_any,


    0U,

};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_Criteria (
    CORBA::tk_alias,
    sizeof (_oc_CosLifeCycle_Criteria),
    (char *) &_oc_CosLifeCycle_Criteria,
    0,
    sizeof (CosLifeCycle::Criteria)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_Criteria =
    &_tc_TAO_tc_CosLifeCycle_Criteria;
}

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

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

CosLifeCycle::NoFactory::~NoFactory (void)
{
}

CosLifeCycle::NoFactory::NoFactory (const ::CosLifeCycle::NoFactory &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
  this->search_key = _tao_excp.search_key;
}

CosLifeCycle::NoFactory&
CosLifeCycle::NoFactory::operator= (const ::CosLifeCycle::NoFactory &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  this->search_key = _tao_excp.search_key;
  return *this;
}

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

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

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

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

void CosLifeCycle::NoFactory::_raise (void) const
{
  TAO_RAISE (*this);
}

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

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



// TAO_IDL - Generated from
// be/be_visitor_exception/exception_ctor.cpp:66

CosLifeCycle::NoFactory::NoFactory (
    const CosLifeCycle::Key & _tao_search_key
  )
  : CORBA::UserException (
        "IDL:omg.org/CosLifeCycle/NoFactory:1.0",
        "NoFactory"
      )
{
  this->search_key = _tao_search_key;
}

// TAO extension - the virtual _type method.
CORBA::TypeCode_ptr CosLifeCycle::NoFactory::_type (void) const
{
  return ::CosLifeCycle::_tc_NoFactory;
}

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

static const CORBA::Long _oc_CosLifeCycle_NoFactory[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  39,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f4e6f46), 
  ACE_NTOHL (0x6163746f), 
  ACE_NTOHL (0x72793a31), 
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosLifeCycle/NoFactory:1.0
    10,
  ACE_NTOHL (0x4e6f4661), 
  ACE_NTOHL (0x63746f72), 
  ACE_NTOHL (0x79000000),  // name = NoFactory
  1, // member count
    11,
  ACE_NTOHL (0x73656172), 
  ACE_NTOHL (0x63685f6b), 
  ACE_NTOHL (0x65790000),  // name = search_key
    CORBA::tk_alias, // typecode kind for typedefs
  372, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    33,
    ACE_NTOHL (0x49444c3a), 
    ACE_NTOHL (0x6f6d672e), 
    ACE_NTOHL (0x6f72672f), 
    ACE_NTOHL (0x436f734c), 
    ACE_NTOHL (0x69666543), 
    ACE_NTOHL (0x79636c65), 
    ACE_NTOHL (0x2f4b6579), 
    ACE_NTOHL (0x3a312e30), 
    ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CosLifeCycle/Key:1.0
        4,
    ACE_NTOHL (0x4b657900),  // name = Key
        CORBA::tk_alias, // typecode kind for typedefs
    312, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      31,
      ACE_NTOHL (0x49444c3a), 
      ACE_NTOHL (0x6f6d672e), 
      ACE_NTOHL (0x6f72672f), 
      ACE_NTOHL (0x436f734e), 
      ACE_NTOHL (0x616d696e), 
      ACE_NTOHL (0x672f4e61), 
      ACE_NTOHL (0x6d653a31), 
      ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosNaming/Name:1.0
            5,
      ACE_NTOHL (0x4e616d65), 
      ACE_NTOHL (0x0),  // name = Name
            CORBA::tk_sequence, // typecode kind
      252, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        CORBA::tk_struct, // typecode kind
        236, // encapsulation length
          TAO_ENCAP_BYTE_ORDER, // byte order
          40,
          ACE_NTOHL (0x49444c3a), 
          ACE_NTOHL (0x6f6d672e), 
          ACE_NTOHL (0x6f72672f), 
          ACE_NTOHL (0x436f734e), 
          ACE_NTOHL (0x616d696e), 
          ACE_NTOHL (0x672f4e61), 
          ACE_NTOHL (0x6d65436f), 
          ACE_NTOHL (0x6d706f6e), 
          ACE_NTOHL (0x656e743a), 
          ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CosNaming/NameComponent:1.0
                    14,
          ACE_NTOHL (0x4e616d65), 
          ACE_NTOHL (0x436f6d70), 
          ACE_NTOHL (0x6f6e656e), 
          ACE_NTOHL (0x74000000),  // name = NameComponent
          2, // member count
                    3,
          ACE_NTOHL (0x69640000),  // name = id
                    CORBA::tk_alias, // typecode kind for typedefs
          64, // encapsulation length
            TAO_ENCAP_BYTE_ORDER, // byte order
            34,
            ACE_NTOHL (0x49444c3a), 
            ACE_NTOHL (0x6f6d672e), 
            ACE_NTOHL (0x6f72672f), 
            ACE_NTOHL (0x436f734e), 
            ACE_NTOHL (0x616d696e), 
            ACE_NTOHL (0x672f4973), 
            ACE_NTOHL (0x7472696e), 
            ACE_NTOHL (0x673a312e), 
            ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
                        8,
            ACE_NTOHL (0x49737472), 
            ACE_NTOHL (0x696e6700),  // name = Istring
                        CORBA::tk_string, 
            0U, // string length

          5,
          ACE_NTOHL (0x6b696e64), 
          ACE_NTOHL (0x0),  // name = kind
                    CORBA::tk_alias, // typecode kind for typedefs
          64, // encapsulation length
            TAO_ENCAP_BYTE_ORDER, // byte order
            34,
            ACE_NTOHL (0x49444c3a), 
            ACE_NTOHL (0x6f6d672e), 
            ACE_NTOHL (0x6f72672f), 
            ACE_NTOHL (0x436f734e), 
            ACE_NTOHL (0x616d696e), 
            ACE_NTOHL (0x672f4973), 
            ACE_NTOHL (0x7472696e), 
            ACE_NTOHL (0x673a312e), 
            ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
                        8,
            ACE_NTOHL (0x49737472), 
            ACE_NTOHL (0x696e6700),  // name = Istring
                        CORBA::tk_string, 
            0U, // string length


        0U,



};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_NoFactory (
    CORBA::tk_except,
    sizeof (_oc_CosLifeCycle_NoFactory),
    (char *) &_oc_CosLifeCycle_NoFactory,
    0,
    sizeof (CosLifeCycle::NoFactory)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_NoFactory =
    &_tc_TAO_tc_CosLifeCycle_NoFactory;
}

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

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

CosLifeCycle::NotCopyable::~NotCopyable (void)
{
}

CosLifeCycle::NotCopyable::NotCopyable (const ::CosLifeCycle::NotCopyable &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
  this->reason = CORBA::string_dup (_tao_excp.reason.in ());
}

CosLifeCycle::NotCopyable&
CosLifeCycle::NotCopyable::operator= (const ::CosLifeCycle::NotCopyable &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  this->reason = CORBA::string_dup (_tao_excp.reason.in ());
  return *this;
}

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

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

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

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

void CosLifeCycle::NotCopyable::_raise (void) const
{
  TAO_RAISE (*this);
}

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

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



// TAO_IDL - Generated from
// be/be_visitor_exception/exception_ctor.cpp:66

CosLifeCycle::NotCopyable::NotCopyable (
    const char * _tao_reason
  )
  : CORBA::UserException (
        "IDL:omg.org/CosLifeCycle/NotCopyable:1.0",
        "NotCopyable"
      )
{
  this->reason = CORBA::string_dup (_tao_reason);
}

// TAO extension - the virtual _type method.
CORBA::TypeCode_ptr CosLifeCycle::NotCopyable::_type (void) const
{
  return ::CosLifeCycle::_tc_NotCopyable;
}

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

static const CORBA::Long _oc_CosLifeCycle_NotCopyable[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  41,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f4e6f74), 
  ACE_NTOHL (0x436f7079), 
  ACE_NTOHL (0x61626c65), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CosLifeCycle/NotCopyable:1.0
    12,
  ACE_NTOHL (0x4e6f7443), 
  ACE_NTOHL (0x6f707961), 
  ACE_NTOHL (0x626c6500),  // name = NotCopyable
  1, // member count
    7,
  ACE_NTOHL (0x72656173), 
  ACE_NTOHL (0x6f6e0000),  // name = reason
    CORBA::tk_string, 
  0U, // string length
};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_NotCopyable (
    CORBA::tk_except,
    sizeof (_oc_CosLifeCycle_NotCopyable),
    (char *) &_oc_CosLifeCycle_NotCopyable,
    0,
    sizeof (CosLifeCycle::NotCopyable)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_NotCopyable =
    &_tc_TAO_tc_CosLifeCycle_NotCopyable;
}

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

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

CosLifeCycle::NotMovable::~NotMovable (void)
{
}

CosLifeCycle::NotMovable::NotMovable (const ::CosLifeCycle::NotMovable &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
  this->reason = CORBA::string_dup (_tao_excp.reason.in ());
}

CosLifeCycle::NotMovable&
CosLifeCycle::NotMovable::operator= (const ::CosLifeCycle::NotMovable &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  this->reason = CORBA::string_dup (_tao_excp.reason.in ());
  return *this;
}

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

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

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

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

void CosLifeCycle::NotMovable::_raise (void) const
{
  TAO_RAISE (*this);
}

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

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



// TAO_IDL - Generated from
// be/be_visitor_exception/exception_ctor.cpp:66

CosLifeCycle::NotMovable::NotMovable (
    const char * _tao_reason
  )
  : CORBA::UserException (
        "IDL:omg.org/CosLifeCycle/NotMovable:1.0",
        "NotMovable"
      )
{
  this->reason = CORBA::string_dup (_tao_reason);
}

// TAO extension - the virtual _type method.
CORBA::TypeCode_ptr CosLifeCycle::NotMovable::_type (void) const
{
  return ::CosLifeCycle::_tc_NotMovable;
}

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

static const CORBA::Long _oc_CosLifeCycle_NotMovable[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  40,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f4e6f74), 
  ACE_NTOHL (0x4d6f7661), 
  ACE_NTOHL (0x626c653a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CosLifeCycle/NotMovable:1.0
    11,
  ACE_NTOHL (0x4e6f744d), 
  ACE_NTOHL (0x6f766162), 
  ACE_NTOHL (0x6c650000),  // name = NotMovable
  1, // member count
    7,
  ACE_NTOHL (0x72656173), 
  ACE_NTOHL (0x6f6e0000),  // name = reason
    CORBA::tk_string, 
  0U, // string length
};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_NotMovable (
    CORBA::tk_except,
    sizeof (_oc_CosLifeCycle_NotMovable),
    (char *) &_oc_CosLifeCycle_NotMovable,
    0,
    sizeof (CosLifeCycle::NotMovable)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_NotMovable =
    &_tc_TAO_tc_CosLifeCycle_NotMovable;
}

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

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

CosLifeCycle::NotRemovable::~NotRemovable (void)
{
}

CosLifeCycle::NotRemovable::NotRemovable (const ::CosLifeCycle::NotRemovable &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
  this->reason = CORBA::string_dup (_tao_excp.reason.in ());
}

CosLifeCycle::NotRemovable&
CosLifeCycle::NotRemovable::operator= (const ::CosLifeCycle::NotRemovable &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  this->reason = CORBA::string_dup (_tao_excp.reason.in ());
  return *this;
}

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

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

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

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

void CosLifeCycle::NotRemovable::_raise (void) const
{
  TAO_RAISE (*this);
}

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

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



// TAO_IDL - Generated from
// be/be_visitor_exception/exception_ctor.cpp:66

CosLifeCycle::NotRemovable::NotRemovable (
    const char * _tao_reason
  )
  : CORBA::UserException (
        "IDL:omg.org/CosLifeCycle/NotRemovable:1.0",
        "NotRemovable"
      )
{
  this->reason = CORBA::string_dup (_tao_reason);
}

// TAO extension - the virtual _type method.
CORBA::TypeCode_ptr CosLifeCycle::NotRemovable::_type (void) const
{
  return ::CosLifeCycle::_tc_NotRemovable;
}

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

static const CORBA::Long _oc_CosLifeCycle_NotRemovable[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  42,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f4e6f74), 
  ACE_NTOHL (0x52656d6f), 
  ACE_NTOHL (0x7661626c), 
  ACE_NTOHL (0x653a312e), 
  ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosLifeCycle/NotRemovable:1.0
    13,
  ACE_NTOHL (0x4e6f7452), 
  ACE_NTOHL (0x656d6f76), 
  ACE_NTOHL (0x61626c65), 
  ACE_NTOHL (0x0),  // name = NotRemovable
  1, // member count
    7,
  ACE_NTOHL (0x72656173), 
  ACE_NTOHL (0x6f6e0000),  // name = reason
    CORBA::tk_string, 
  0U, // string length
};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_NotRemovable (
    CORBA::tk_except,
    sizeof (_oc_CosLifeCycle_NotRemovable),
    (char *) &_oc_CosLifeCycle_NotRemovable,
    0,
    sizeof (CosLifeCycle::NotRemovable)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_NotRemovable =
    &_tc_TAO_tc_CosLifeCycle_NotRemovable;
}

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

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

CosLifeCycle::InvalidCriteria::~InvalidCriteria (void)
{
}

CosLifeCycle::InvalidCriteria::InvalidCriteria (const ::CosLifeCycle::InvalidCriteria &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
  this->invalid_criteria = _tao_excp.invalid_criteria;
}

CosLifeCycle::InvalidCriteria&
CosLifeCycle::InvalidCriteria::operator= (const ::CosLifeCycle::InvalidCriteria &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  this->invalid_criteria = _tao_excp.invalid_criteria;
  return *this;
}

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

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

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

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

void CosLifeCycle::InvalidCriteria::_raise (void) const
{
  TAO_RAISE (*this);
}

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

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



// TAO_IDL - Generated from
// be/be_visitor_exception/exception_ctor.cpp:66

CosLifeCycle::InvalidCriteria::InvalidCriteria (
    const CosLifeCycle::Criteria & _tao_invalid_criteria
  )
  : CORBA::UserException (
        "IDL:omg.org/CosLifeCycle/InvalidCriteria:1.0",
        "InvalidCriteria"
      )
{
  this->invalid_criteria = _tao_invalid_criteria;
}

// TAO extension - the virtual _type method.
CORBA::TypeCode_ptr CosLifeCycle::InvalidCriteria::_type (void) const
{
  return ::CosLifeCycle::_tc_InvalidCriteria;
}

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

static const CORBA::Long _oc_CosLifeCycle_InvalidCriteria[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  45,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f496e76), 
  ACE_NTOHL (0x616c6964), 
  ACE_NTOHL (0x43726974), 
  ACE_NTOHL (0x65726961), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CosLifeCycle/InvalidCriteria:1.0
    16,
  ACE_NTOHL (0x496e7661), 
  ACE_NTOHL (0x6c696443), 
  ACE_NTOHL (0x72697465), 
  ACE_NTOHL (0x72696100),  // name = InvalidCriteria
  1, // member count
    17,
  ACE_NTOHL (0x696e7661), 
  ACE_NTOHL (0x6c69645f), 
  ACE_NTOHL (0x63726974), 
  ACE_NTOHL (0x65726961), 
  ACE_NTOHL (0x0),  // name = invalid_criteria
    CORBA::tk_alias, // typecode kind for typedefs
  264, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    38,
    ACE_NTOHL (0x49444c3a), 
    ACE_NTOHL (0x6f6d672e), 
    ACE_NTOHL (0x6f72672f), 
    ACE_NTOHL (0x436f734c), 
    ACE_NTOHL (0x69666543), 
    ACE_NTOHL (0x79636c65), 
    ACE_NTOHL (0x2f437269), 
    ACE_NTOHL (0x74657269), 
    ACE_NTOHL (0x613a312e), 
    ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosLifeCycle/Criteria:1.0
        9,
    ACE_NTOHL (0x43726974), 
    ACE_NTOHL (0x65726961), 
    ACE_NTOHL (0x0),  // name = Criteria
        CORBA::tk_sequence, // typecode kind
    192, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      CORBA::tk_struct, // typecode kind
      176, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        43,
        ACE_NTOHL (0x49444c3a), 
        ACE_NTOHL (0x6f6d672e), 
        ACE_NTOHL (0x6f72672f), 
        ACE_NTOHL (0x436f734c), 
        ACE_NTOHL (0x69666543), 
        ACE_NTOHL (0x79636c65), 
        ACE_NTOHL (0x2f4e616d), 
        ACE_NTOHL (0x6556616c), 
        ACE_NTOHL (0x75655061), 
        ACE_NTOHL (0x69723a31), 
        ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosLifeCycle/NameValuePair:1.0
                14,
        ACE_NTOHL (0x4e616d65), 
        ACE_NTOHL (0x56616c75), 
        ACE_NTOHL (0x65506169), 
        ACE_NTOHL (0x72000000),  // name = NameValuePair
        2, // member count
                5,
        ACE_NTOHL (0x6e616d65), 
        ACE_NTOHL (0x0),  // name = name
                CORBA::tk_alias, // typecode kind for typedefs
        64, // encapsulation length
          TAO_ENCAP_BYTE_ORDER, // byte order
          34,
          ACE_NTOHL (0x49444c3a), 
          ACE_NTOHL (0x6f6d672e), 
          ACE_NTOHL (0x6f72672f), 
          ACE_NTOHL (0x436f734e), 
          ACE_NTOHL (0x616d696e), 
          ACE_NTOHL (0x672f4973), 
          ACE_NTOHL (0x7472696e), 
          ACE_NTOHL (0x673a312e), 
          ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
                    8,
          ACE_NTOHL (0x49737472), 
          ACE_NTOHL (0x696e6700),  // name = Istring
                    CORBA::tk_string, 
          0U, // string length

        6,
        ACE_NTOHL (0x76616c75), 
        ACE_NTOHL (0x65000000),  // name = value
                CORBA::tk_any,


      0U,


};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_InvalidCriteria (
    CORBA::tk_except,
    sizeof (_oc_CosLifeCycle_InvalidCriteria),
    (char *) &_oc_CosLifeCycle_InvalidCriteria,
    0,
    sizeof (CosLifeCycle::InvalidCriteria)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_InvalidCriteria =
    &_tc_TAO_tc_CosLifeCycle_InvalidCriteria;
}

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

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

CosLifeCycle::CannotMeetCriteria::~CannotMeetCriteria (void)
{
}

CosLifeCycle::CannotMeetCriteria::CannotMeetCriteria (const ::CosLifeCycle::CannotMeetCriteria &_tao_excp)
  : CORBA::UserException (
        _tao_excp._rep_id (),
        _tao_excp._name ()
      )
{
  this->unmet_criteria = _tao_excp.unmet_criteria;
}

CosLifeCycle::CannotMeetCriteria&
CosLifeCycle::CannotMeetCriteria::operator= (const ::CosLifeCycle::CannotMeetCriteria &_tao_excp)
{
  this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp);
  this->unmet_criteria = _tao_excp.unmet_criteria;
  return *this;
}

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

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

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

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

void CosLifeCycle::CannotMeetCriteria::_raise (void) const
{
  TAO_RAISE (*this);
}

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

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



// TAO_IDL - Generated from
// be/be_visitor_exception/exception_ctor.cpp:66

CosLifeCycle::CannotMeetCriteria::CannotMeetCriteria (
    const CosLifeCycle::Criteria & _tao_unmet_criteria
  )
  : CORBA::UserException (
        "IDL:omg.org/CosLifeCycle/CannotMeetCriteria:1.0",
        "CannotMeetCriteria"
      )
{
  this->unmet_criteria = _tao_unmet_criteria;
}

// TAO extension - the virtual _type method.
CORBA::TypeCode_ptr CosLifeCycle::CannotMeetCriteria::_type (void) const
{
  return ::CosLifeCycle::_tc_CannotMeetCriteria;
}

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

static const CORBA::Long _oc_CosLifeCycle_CannotMeetCriteria[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  48,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f43616e), 
  ACE_NTOHL (0x6e6f744d), 
  ACE_NTOHL (0x65657443), 
  ACE_NTOHL (0x72697465), 
  ACE_NTOHL (0x7269613a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CosLifeCycle/CannotMeetCriteria:1.0
    19,
  ACE_NTOHL (0x43616e6e), 
  ACE_NTOHL (0x6f744d65), 
  ACE_NTOHL (0x65744372), 
  ACE_NTOHL (0x69746572), 
  ACE_NTOHL (0x69610000),  // name = CannotMeetCriteria
  1, // member count
    15,
  ACE_NTOHL (0x756e6d65), 
  ACE_NTOHL (0x745f6372), 
  ACE_NTOHL (0x69746572), 
  ACE_NTOHL (0x69610000),  // name = unmet_criteria
    CORBA::tk_alias, // typecode kind for typedefs
  264, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    38,
    ACE_NTOHL (0x49444c3a), 
    ACE_NTOHL (0x6f6d672e), 
    ACE_NTOHL (0x6f72672f), 
    ACE_NTOHL (0x436f734c), 
    ACE_NTOHL (0x69666543), 
    ACE_NTOHL (0x79636c65), 
    ACE_NTOHL (0x2f437269), 
    ACE_NTOHL (0x74657269), 
    ACE_NTOHL (0x613a312e), 
    ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosLifeCycle/Criteria:1.0
        9,
    ACE_NTOHL (0x43726974), 
    ACE_NTOHL (0x65726961), 
    ACE_NTOHL (0x0),  // name = Criteria
        CORBA::tk_sequence, // typecode kind
    192, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      CORBA::tk_struct, // typecode kind
      176, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        43,
        ACE_NTOHL (0x49444c3a), 
        ACE_NTOHL (0x6f6d672e), 
        ACE_NTOHL (0x6f72672f), 
        ACE_NTOHL (0x436f734c), 
        ACE_NTOHL (0x69666543), 
        ACE_NTOHL (0x79636c65), 
        ACE_NTOHL (0x2f4e616d), 
        ACE_NTOHL (0x6556616c), 
        ACE_NTOHL (0x75655061), 
        ACE_NTOHL (0x69723a31), 
        ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosLifeCycle/NameValuePair:1.0
                14,
        ACE_NTOHL (0x4e616d65), 
        ACE_NTOHL (0x56616c75), 
        ACE_NTOHL (0x65506169), 
        ACE_NTOHL (0x72000000),  // name = NameValuePair
        2, // member count
                5,
        ACE_NTOHL (0x6e616d65), 
        ACE_NTOHL (0x0),  // name = name
                CORBA::tk_alias, // typecode kind for typedefs
        64, // encapsulation length
          TAO_ENCAP_BYTE_ORDER, // byte order
          34,
          ACE_NTOHL (0x49444c3a), 
          ACE_NTOHL (0x6f6d672e), 
          ACE_NTOHL (0x6f72672f), 
          ACE_NTOHL (0x436f734e), 
          ACE_NTOHL (0x616d696e), 
          ACE_NTOHL (0x672f4973), 
          ACE_NTOHL (0x7472696e), 
          ACE_NTOHL (0x673a312e), 
          ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CosNaming/Istring:1.0
                    8,
          ACE_NTOHL (0x49737472), 
          ACE_NTOHL (0x696e6700),  // name = Istring
                    CORBA::tk_string, 
          0U, // string length

        6,
        ACE_NTOHL (0x76616c75), 
        ACE_NTOHL (0x65000000),  // name = value
                CORBA::tk_any,


      0U,


};

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_CannotMeetCriteria (
    CORBA::tk_except,
    sizeof (_oc_CosLifeCycle_CannotMeetCriteria),
    (char *) &_oc_CosLifeCycle_CannotMeetCriteria,
    0,
    sizeof (CosLifeCycle::CannotMeetCriteria)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_CannotMeetCriteria =
    &_tc_TAO_tc_CosLifeCycle_CannotMeetCriteria;
}

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

// Traits specializations for CosLifeCycle::FactoryFinder.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosLifeCycle::FactoryFinder_ptr
TAO::Objref_Traits<CosLifeCycle::FactoryFinder>::tao_duplicate (
    CosLifeCycle::FactoryFinder_ptr p
  )
{
  return CosLifeCycle::FactoryFinder::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<CosLifeCycle::FactoryFinder>::tao_release (
    CosLifeCycle::FactoryFinder_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosLifeCycle::FactoryFinder_ptr
TAO::Objref_Traits<CosLifeCycle::FactoryFinder>::tao_nil (void)
{
  return CosLifeCycle::FactoryFinder::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<CosLifeCycle::FactoryFinder>::tao_marshal (
    CosLifeCycle::FactoryFinder_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

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

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

::CosLifeCycle::Factories * CosLifeCycle::FactoryFinder::find_factories (
    const ::CosLifeCycle::Key & factory_key
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::CosLifeCycle::NoFactory
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_FactoryFinder_Proxy_Broker_ == 0)
    {
      CosLifeCycle_FactoryFinder_setup_collocation ();
    }
  
  TAO::Arg_Traits< ::CosLifeCycle::Factories>::ret_val _tao_retval;
  TAO::Arg_Traits< ::CosLifeCycle::Key>::in_arg_val _tao_factory_key (factory_key);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_factory_key
    };
  
  static TAO::Exception_Data
  _tao_CosLifeCycle_FactoryFinder_find_factories_exceptiondata [] = 
    {
      {
        "IDL:omg.org/CosLifeCycle/NoFactory:1.0",
        CosLifeCycle::NoFactory::_alloc,
        CosLifeCycle::_tc_NoFactory
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      2,
      "find_factories",
      14,
      this->the_TAO_FactoryFinder_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_CosLifeCycle_FactoryFinder_find_factories_exceptiondata,
      1
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

CosLifeCycle::FactoryFinder::FactoryFinder (void)
 : the_TAO_FactoryFinder_Proxy_Broker_ (0)
{
  this->CosLifeCycle_FactoryFinder_setup_collocation ();
}

void
CosLifeCycle::FactoryFinder::CosLifeCycle_FactoryFinder_setup_collocation ()
{
  if (::CosLifeCycle__TAO_FactoryFinder_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_FactoryFinder_Proxy_Broker_ =
        ::CosLifeCycle__TAO_FactoryFinder_Proxy_Broker_Factory_function_pointer (this);
    }
}

CosLifeCycle::FactoryFinder::~FactoryFinder (void)
{}

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

CosLifeCycle::FactoryFinder_ptr
CosLifeCycle::FactoryFinder::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<FactoryFinder>::narrow (
        _tao_objref,
        "IDL:omg.org/CosLifeCycle/FactoryFinder:1.0",
        CosLifeCycle__TAO_FactoryFinder_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosLifeCycle::FactoryFinder_ptr
CosLifeCycle::FactoryFinder::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<FactoryFinder>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/CosLifeCycle/FactoryFinder:1.0",
        CosLifeCycle__TAO_FactoryFinder_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosLifeCycle::FactoryFinder_ptr
CosLifeCycle::FactoryFinder::_duplicate (FactoryFinder_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

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

CORBA::Boolean
CosLifeCycle::FactoryFinder::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

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

static const CORBA::Long _oc_CosLifeCycle_FactoryFinder[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  43,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f466163), 
  ACE_NTOHL (0x746f7279), 
  ACE_NTOHL (0x46696e64), 
  ACE_NTOHL (0x65723a31), 
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/CosLifeCycle/FactoryFinder:1.0
    14,
  ACE_NTOHL (0x46616374), 
  ACE_NTOHL (0x6f727946), 
  ACE_NTOHL (0x696e6465), 
  ACE_NTOHL (0x72000000),  // name = FactoryFinder
  };

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_FactoryFinder (
    CORBA::tk_objref,
    sizeof (_oc_CosLifeCycle_FactoryFinder),
    (char *) &_oc_CosLifeCycle_FactoryFinder,
    0,
    sizeof (CosLifeCycle::FactoryFinder)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_FactoryFinder =
    &_tc_TAO_tc_CosLifeCycle_FactoryFinder;
}

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

// Traits specializations for CosLifeCycle::LifeCycleObject.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosLifeCycle::LifeCycleObject_ptr
TAO::Objref_Traits<CosLifeCycle::LifeCycleObject>::tao_duplicate (
    CosLifeCycle::LifeCycleObject_ptr p
  )
{
  return CosLifeCycle::LifeCycleObject::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<CosLifeCycle::LifeCycleObject>::tao_release (
    CosLifeCycle::LifeCycleObject_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosLifeCycle::LifeCycleObject_ptr
TAO::Objref_Traits<CosLifeCycle::LifeCycleObject>::tao_nil (void)
{
  return CosLifeCycle::LifeCycleObject::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<CosLifeCycle::LifeCycleObject>::tao_marshal (
    CosLifeCycle::LifeCycleObject_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

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

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

::CosLifeCycle::LifeCycleObject_ptr CosLifeCycle::LifeCycleObject::copy (
    ::CosLifeCycle::FactoryFinder_ptr there,
    const ::CosLifeCycle::Criteria & the_criteria
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::CosLifeCycle::NoFactory,
    ::CosLifeCycle::NotCopyable,
    ::CosLifeCycle::InvalidCriteria,
    ::CosLifeCycle::CannotMeetCriteria
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_LifeCycleObject_Proxy_Broker_ == 0)
    {
      CosLifeCycle_LifeCycleObject_setup_collocation ();
    }
  
  TAO::Arg_Traits< ::CosLifeCycle::LifeCycleObject>::ret_val _tao_retval;
  TAO::Arg_Traits< ::CosLifeCycle::FactoryFinder>::in_arg_val _tao_there (there);
  TAO::Arg_Traits< ::CosLifeCycle::Criteria>::in_arg_val _tao_the_criteria (the_criteria);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_there,
      &_tao_the_criteria
    };
  
  static TAO::Exception_Data
  _tao_CosLifeCycle_LifeCycleObject_copy_exceptiondata [] = 
    {
      {
        "IDL:omg.org/CosLifeCycle/NoFactory:1.0",
        CosLifeCycle::NoFactory::_alloc,
        CosLifeCycle::_tc_NoFactory
      },
      
      {
        "IDL:omg.org/CosLifeCycle/NotCopyable:1.0",
        CosLifeCycle::NotCopyable::_alloc,
        CosLifeCycle::_tc_NotCopyable
      },
      
      {
        "IDL:omg.org/CosLifeCycle/InvalidCriteria:1.0",
        CosLifeCycle::InvalidCriteria::_alloc,
        CosLifeCycle::_tc_InvalidCriteria
      },
      
      {
        "IDL:omg.org/CosLifeCycle/CannotMeetCriteria:1.0",
        CosLifeCycle::CannotMeetCriteria::_alloc,
        CosLifeCycle::_tc_CannotMeetCriteria
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      3,
      "copy",
      4,
      this->the_TAO_LifeCycleObject_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_CosLifeCycle_LifeCycleObject_copy_exceptiondata,
      4
      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 CosLifeCycle::LifeCycleObject::move (
    ::CosLifeCycle::FactoryFinder_ptr there,
    const ::CosLifeCycle::Criteria & the_criteria
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::CosLifeCycle::NoFactory,
    ::CosLifeCycle::NotMovable,
    ::CosLifeCycle::InvalidCriteria,
    ::CosLifeCycle::CannotMeetCriteria
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_LifeCycleObject_Proxy_Broker_ == 0)
    {
      CosLifeCycle_LifeCycleObject_setup_collocation ();
    }
  
  TAO::Arg_Traits< void>::ret_val _tao_retval;
  TAO::Arg_Traits< ::CosLifeCycle::FactoryFinder>::in_arg_val _tao_there (there);
  TAO::Arg_Traits< ::CosLifeCycle::Criteria>::in_arg_val _tao_the_criteria (the_criteria);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_there,
      &_tao_the_criteria
    };
  
  static TAO::Exception_Data
  _tao_CosLifeCycle_LifeCycleObject_move_exceptiondata [] = 
    {
      {
        "IDL:omg.org/CosLifeCycle/NoFactory:1.0",
        CosLifeCycle::NoFactory::_alloc,
        CosLifeCycle::_tc_NoFactory
      },
      
      {
        "IDL:omg.org/CosLifeCycle/NotMovable:1.0",
        CosLifeCycle::NotMovable::_alloc,
        CosLifeCycle::_tc_NotMovable
      },
      
      {
        "IDL:omg.org/CosLifeCycle/InvalidCriteria:1.0",
        CosLifeCycle::InvalidCriteria::_alloc,
        CosLifeCycle::_tc_InvalidCriteria
      },
      
      {
        "IDL:omg.org/CosLifeCycle/CannotMeetCriteria:1.0",
        CosLifeCycle::CannotMeetCriteria::_alloc,
        CosLifeCycle::_tc_CannotMeetCriteria
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      3,
      "move",
      4,
      this->the_TAO_LifeCycleObject_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_CosLifeCycle_LifeCycleObject_move_exceptiondata,
      4
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK;
}

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

void CosLifeCycle::LifeCycleObject::remove (
    ACE_ENV_SINGLE_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::CosLifeCycle::NotRemovable
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_LifeCycleObject_Proxy_Broker_ == 0)
    {
      CosLifeCycle_LifeCycleObject_setup_collocation ();
    }
  
  TAO::Arg_Traits< void>::ret_val _tao_retval;
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval
    };
  
  static TAO::Exception_Data
  _tao_CosLifeCycle_LifeCycleObject_remove_exceptiondata [] = 
    {
      {
        "IDL:omg.org/CosLifeCycle/NotRemovable:1.0",
        CosLifeCycle::NotRemovable::_alloc,
        CosLifeCycle::_tc_NotRemovable
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      1,
      "remove",
      6,
      this->the_TAO_LifeCycleObject_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_CosLifeCycle_LifeCycleObject_remove_exceptiondata,
      1
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK;
}

CosLifeCycle::LifeCycleObject::LifeCycleObject (void)
 : the_TAO_LifeCycleObject_Proxy_Broker_ (0)
{
  this->CosLifeCycle_LifeCycleObject_setup_collocation ();
}

void
CosLifeCycle::LifeCycleObject::CosLifeCycle_LifeCycleObject_setup_collocation ()
{
  if (::CosLifeCycle__TAO_LifeCycleObject_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_LifeCycleObject_Proxy_Broker_ =
        ::CosLifeCycle__TAO_LifeCycleObject_Proxy_Broker_Factory_function_pointer (this);
    }
}

CosLifeCycle::LifeCycleObject::~LifeCycleObject (void)
{}

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

CosLifeCycle::LifeCycleObject_ptr
CosLifeCycle::LifeCycleObject::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<LifeCycleObject>::narrow (
        _tao_objref,
        "IDL:omg.org/CosLifeCycle/LifeCycleObject:1.0",
        CosLifeCycle__TAO_LifeCycleObject_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosLifeCycle::LifeCycleObject_ptr
CosLifeCycle::LifeCycleObject::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<LifeCycleObject>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/CosLifeCycle/LifeCycleObject:1.0",
        CosLifeCycle__TAO_LifeCycleObject_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosLifeCycle::LifeCycleObject_ptr
CosLifeCycle::LifeCycleObject::_duplicate (LifeCycleObject_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

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

CORBA::Boolean
CosLifeCycle::LifeCycleObject::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

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

static const CORBA::Long _oc_CosLifeCycle_LifeCycleObject[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  45,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f4c6966), 
  ACE_NTOHL (0x65437963), 
  ACE_NTOHL (0x6c654f62), 
  ACE_NTOHL (0x6a656374), 
  ACE_NTOHL (0x3a312e30), 
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CosLifeCycle/LifeCycleObject:1.0
    16,
  ACE_NTOHL (0x4c696665), 
  ACE_NTOHL (0x4379636c), 
  ACE_NTOHL (0x654f626a), 
  ACE_NTOHL (0x65637400),  // name = LifeCycleObject
  };

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_LifeCycleObject (
    CORBA::tk_objref,
    sizeof (_oc_CosLifeCycle_LifeCycleObject),
    (char *) &_oc_CosLifeCycle_LifeCycleObject,
    0,
    sizeof (CosLifeCycle::LifeCycleObject)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_LifeCycleObject =
    &_tc_TAO_tc_CosLifeCycle_LifeCycleObject;
}

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

// Traits specializations for CosLifeCycle::GenericFactory.

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosLifeCycle::GenericFactory_ptr
TAO::Objref_Traits<CosLifeCycle::GenericFactory>::tao_duplicate (
    CosLifeCycle::GenericFactory_ptr p
  )
{
  return CosLifeCycle::GenericFactory::_duplicate (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
void
TAO::Objref_Traits<CosLifeCycle::GenericFactory>::tao_release (
    CosLifeCycle::GenericFactory_ptr p
  )
{
  CORBA::release (p);
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CosLifeCycle::GenericFactory_ptr
TAO::Objref_Traits<CosLifeCycle::GenericFactory>::tao_nil (void)
{
  return CosLifeCycle::GenericFactory::_nil ();
}

ACE_TEMPLATE_CLASS_MEMBER_SPECIALIZATION
CORBA::Boolean
TAO::Objref_Traits<CosLifeCycle::GenericFactory>::tao_marshal (
    CosLifeCycle::GenericFactory_ptr p,
    TAO_OutputCDR & cdr
  )
{
  return CORBA::Object::marshal (p, cdr);
}

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

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

CORBA::Boolean CosLifeCycle::GenericFactory::supports (
    const ::CosLifeCycle::Key & k
    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_GenericFactory_Proxy_Broker_ == 0)
    {
      CosLifeCycle_GenericFactory_setup_collocation ();
    }
  
  TAO::Arg_Traits< ACE_InputCDR::to_boolean>::ret_val _tao_retval;
  TAO::Arg_Traits< ::CosLifeCycle::Key>::in_arg_val _tao_k (k);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_k
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      2,
      "supports",
      8,
      this->the_TAO_GenericFactory_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

CORBA::Object_ptr CosLifeCycle::GenericFactory::create_object (
    const ::CosLifeCycle::Key & k,
    const ::CosLifeCycle::Criteria & the_criteria
    ACE_ENV_ARG_DECL
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    ::CosLifeCycle::NoFactory,
    ::CosLifeCycle::InvalidCriteria,
    ::CosLifeCycle::CannotMeetCriteria
  ))
{
  if (!this->is_evaluated ())
    {
      ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this);
    }
  
  if (this->the_TAO_GenericFactory_Proxy_Broker_ == 0)
    {
      CosLifeCycle_GenericFactory_setup_collocation ();
    }
  
  TAO::Arg_Traits< CORBA::Object>::ret_val _tao_retval;
  TAO::Arg_Traits< ::CosLifeCycle::Key>::in_arg_val _tao_k (k);
  TAO::Arg_Traits< ::CosLifeCycle::Criteria>::in_arg_val _tao_the_criteria (the_criteria);
  
  TAO::Argument *_the_tao_operation_signature [] =
    {
      &_tao_retval,
      &_tao_k,
      &_tao_the_criteria
    };
  
  static TAO::Exception_Data
  _tao_CosLifeCycle_GenericFactory_create_object_exceptiondata [] = 
    {
      {
        "IDL:omg.org/CosLifeCycle/NoFactory:1.0",
        CosLifeCycle::NoFactory::_alloc,
        CosLifeCycle::_tc_NoFactory
      },
      
      {
        "IDL:omg.org/CosLifeCycle/InvalidCriteria:1.0",
        CosLifeCycle::InvalidCriteria::_alloc,
        CosLifeCycle::_tc_InvalidCriteria
      },
      
      {
        "IDL:omg.org/CosLifeCycle/CannotMeetCriteria:1.0",
        CosLifeCycle::CannotMeetCriteria::_alloc,
        CosLifeCycle::_tc_CannotMeetCriteria
      }
    };
  
  TAO::Invocation_Adapter _tao_call (
      this,
      _the_tao_operation_signature,
      3,
      "create_object",
      13,
      this->the_TAO_GenericFactory_Proxy_Broker_
    );
  
  _tao_call.invoke (
      _tao_CosLifeCycle_GenericFactory_create_object_exceptiondata,
      3
      ACE_ENV_ARG_PARAMETER
    );
  ACE_CHECK_RETURN (_tao_retval.excp ());
  
  return _tao_retval.retn ();
}

CosLifeCycle::GenericFactory::GenericFactory (void)
 : the_TAO_GenericFactory_Proxy_Broker_ (0)
{
  this->CosLifeCycle_GenericFactory_setup_collocation ();
}

void
CosLifeCycle::GenericFactory::CosLifeCycle_GenericFactory_setup_collocation ()
{
  if (::CosLifeCycle__TAO_GenericFactory_Proxy_Broker_Factory_function_pointer)
    {
      this->the_TAO_GenericFactory_Proxy_Broker_ =
        ::CosLifeCycle__TAO_GenericFactory_Proxy_Broker_Factory_function_pointer (this);
    }
}

CosLifeCycle::GenericFactory::~GenericFactory (void)
{}

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

CosLifeCycle::GenericFactory_ptr
CosLifeCycle::GenericFactory::_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<GenericFactory>::narrow (
        _tao_objref,
        "IDL:omg.org/CosLifeCycle/GenericFactory:1.0",
        CosLifeCycle__TAO_GenericFactory_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosLifeCycle::GenericFactory_ptr
CosLifeCycle::GenericFactory::_unchecked_narrow (
    CORBA::Object_ptr _tao_objref
    ACE_ENV_ARG_DECL
  )
{
  return
    TAO::Narrow_Utils<GenericFactory>::unchecked_narrow (
        _tao_objref,
        "IDL:omg.org/CosLifeCycle/GenericFactory:1.0",
        CosLifeCycle__TAO_GenericFactory_Proxy_Broker_Factory_function_pointer
        ACE_ENV_ARG_PARAMETER
      );
}

CosLifeCycle::GenericFactory_ptr
CosLifeCycle::GenericFactory::_duplicate (GenericFactory_ptr obj)
{
  if (! CORBA::is_nil (obj))
    {
      obj->_add_ref ();
    }
  
  return obj;
}

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

CORBA::Boolean
CosLifeCycle::GenericFactory::marshal (TAO_OutputCDR &cdr)
{
  return (cdr << this);
}

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

static const CORBA::Long _oc_CosLifeCycle_GenericFactory[] =
{
    TAO_ENCAP_BYTE_ORDER, // byte order
  44,
  ACE_NTOHL (0x49444c3a), 
  ACE_NTOHL (0x6f6d672e), 
  ACE_NTOHL (0x6f72672f), 
  ACE_NTOHL (0x436f734c), 
  ACE_NTOHL (0x69666543), 
  ACE_NTOHL (0x79636c65), 
  ACE_NTOHL (0x2f47656e), 
  ACE_NTOHL (0x65726963), 
  ACE_NTOHL (0x46616374), 
  ACE_NTOHL (0x6f72793a), 
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CosLifeCycle/GenericFactory:1.0
    15,
  ACE_NTOHL (0x47656e65), 
  ACE_NTOHL (0x72696346), 
  ACE_NTOHL (0x6163746f), 
  ACE_NTOHL (0x72790000),  // name = GenericFactory
  };

static CORBA::TypeCode _tc_TAO_tc_CosLifeCycle_GenericFactory (
    CORBA::tk_objref,
    sizeof (_oc_CosLifeCycle_GenericFactory),
    (char *) &_oc_CosLifeCycle_GenericFactory,
    0,
    sizeof (CosLifeCycle::GenericFactory)
  );

namespace CosLifeCycle
{
  ::CORBA::TypeCode_ptr _tc_GenericFactory =
    &_tc_TAO_tc_CosLifeCycle_GenericFactory;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const CosLifeCycle::Criteria *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<CosLifeCycle::Criteria>::extract (
        _tao_any,
        CosLifeCycle::Criteria::_tao_any_destructor,
        CosLifeCycle::_tc_Criteria,
        _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<CosLifeCycle::NoFactory>::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 CosLifeCycle::NoFactory &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<CosLifeCycle::NoFactory>::insert_copy (
      _tao_any,
      CosLifeCycle::NoFactory::_tao_any_destructor,
      CosLifeCycle::_tc_NoFactory,
      _tao_elem
    );
}

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

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

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const CosLifeCycle::NoFactory *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<CosLifeCycle::NoFactory>::extract (
        _tao_any,
        CosLifeCycle::NoFactory::_tao_any_destructor,
        CosLifeCycle::_tc_NoFactory,
        _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<CosLifeCycle::NotCopyable>::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 CosLifeCycle::NotCopyable &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<CosLifeCycle::NotCopyable>::insert_copy (
      _tao_any,
      CosLifeCycle::NotCopyable::_tao_any_destructor,
      CosLifeCycle::_tc_NotCopyable,
      _tao_elem
    );
}

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

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

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const CosLifeCycle::NotCopyable *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<CosLifeCycle::NotCopyable>::extract (
        _tao_any,
        CosLifeCycle::NotCopyable::_tao_any_destructor,
        CosLifeCycle::_tc_NotCopyable,
        _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<CosLifeCycle::NotMovable>::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 CosLifeCycle::NotMovable &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<CosLifeCycle::NotMovable>::insert_copy (
      _tao_any,
      CosLifeCycle::NotMovable::_tao_any_destructor,
      CosLifeCycle::_tc_NotMovable,
      _tao_elem
    );
}

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

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

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const CosLifeCycle::NotMovable *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<CosLifeCycle::NotMovable>::extract (
        _tao_any,
        CosLifeCycle::NotMovable::_tao_any_destructor,
        CosLifeCycle::_tc_NotMovable,
        _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<CosLifeCycle::NotRemovable>::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 CosLifeCycle::NotRemovable &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<CosLifeCycle::NotRemovable>::insert_copy (
      _tao_any,
      CosLifeCycle::NotRemovable::_tao_any_destructor,
      CosLifeCycle::_tc_NotRemovable,
      _tao_elem
    );
}

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

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

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const CosLifeCycle::NotRemovable *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<CosLifeCycle::NotRemovable>::extract (
        _tao_any,
        CosLifeCycle::NotRemovable::_tao_any_destructor,
        CosLifeCycle::_tc_NotRemovable,
        _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<CosLifeCycle::InvalidCriteria>::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 CosLifeCycle::InvalidCriteria &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<CosLifeCycle::InvalidCriteria>::insert_copy (
      _tao_any,
      CosLifeCycle::InvalidCriteria::_tao_any_destructor,
      CosLifeCycle::_tc_InvalidCriteria,
      _tao_elem
    );
}

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

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

// Extraction to const pointer.
CORBA::Boolean operator>>= (
    const CORBA::Any &_tao_any,
    const CosLifeCycle::InvalidCriteria *&_tao_elem
  )
{
  return
    TAO::Any_Dual_Impl_T<CosLifeCycle::InvalidCriteria>::extract (
        _tao_any,
        CosLifeCycle::InvalidCriteria::_tao_any_destructor,
        CosLifeCycle::_tc_InvalidCriteria,
        _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<CosLifeCycle::CannotMeetCriteria>::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 CosLifeCycle::CannotMeetCriteria &_tao_elem
  )
{
  TAO::Any_Dual_Impl_T<CosLifeCycle::CannotMeetCriteria>::insert_copy (
      _tao_any,
      CosLifeCycle::CannotMeetCriteria::_tao_any_destructor,
      CosLifeCycle::_tc_CannotMeetCriteria,
      _tao_elem
    );
}

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

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

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

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

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

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

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    CosLifeCycle::FactoryFinder_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<CosLifeCycle::FactoryFinder>::extract (
        _tao_any,
        CosLifeCycle::FactoryFinder::_tao_any_destructor,
        CosLifeCycle::_tc_FactoryFinder,
        _tao_elem
      );
}

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

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

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

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    CosLifeCycle::LifeCycleObject_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<CosLifeCycle::LifeCycleObject>::extract (
        _tao_any,
        CosLifeCycle::LifeCycleObject::_tao_any_destructor,
        CosLifeCycle::_tc_LifeCycleObject,
        _tao_elem
      );
}

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

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

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

CORBA::Boolean
operator>>= (
    const CORBA::Any &_tao_any,
    CosLifeCycle::GenericFactory_ptr &_tao_elem
  )
{
  return
    TAO::Any_Impl_T<CosLifeCycle::GenericFactory>::extract (
        _tao_any,
        CosLifeCycle::GenericFactory::_tao_any_destructor,
        CosLifeCycle::_tc_GenericFactory,
        _tao_elem
      );
}

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

#if !defined _TAO_CDR_OP_CosLifeCycle_Factories_CPP_
#define _TAO_CDR_OP_CosLifeCycle_Factories_CPP_

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::Factories &_tao_sequence
  )
{
  const CORBA::ULong _tao_seq_len = _tao_sequence.length ();
  
  if (strm << _tao_seq_len)
    {
      // Encode all elements.
      CORBA::Boolean _tao_marshal_flag = 1;
      
      for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i)
        {
          _tao_marshal_flag = (strm << _tao_sequence[i].in ());
        }
      
      return _tao_marshal_flag;
    }
  
  return 0;
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::Factories &_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.
      CORBA::Boolean _tao_marshal_flag = 1;
      
      for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i)
        {
          _tao_marshal_flag = (strm >> _tao_sequence[i].out ());
        }
      
      return _tao_marshal_flag;
    
    }
  
  return 0;
}

#endif /* _TAO_CDR_OP_CosLifeCycle_Factories_CPP_ */

// TAO_IDL - Generated from
// be/be_visitor_structure/cdr_op_cs.cpp:61

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::NameValuePair &_tao_aggregate
  )
{
  return
    (strm << _tao_aggregate.name.in ()) &&
    (strm << _tao_aggregate.value);
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::NameValuePair &_tao_aggregate
  )
{
  return
    (strm >> _tao_aggregate.name.out ()) &&
    (strm >> _tao_aggregate.value);
}

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

#if !defined _TAO_CDR_OP_CosLifeCycle_Criteria_CPP_
#define _TAO_CDR_OP_CosLifeCycle_Criteria_CPP_

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::Criteria &_tao_sequence
  )
{
  const CORBA::ULong _tao_seq_len = _tao_sequence.length ();
  
  if (strm << _tao_seq_len)
    {
      // Encode all elements.
      CORBA::Boolean _tao_marshal_flag = 1;
      
      for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i)
        {
          _tao_marshal_flag = (strm << _tao_sequence[i]);
        }
      
      return _tao_marshal_flag;
    }
  
  return 0;
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::Criteria &_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.
      CORBA::Boolean _tao_marshal_flag = 1;
      
      for (CORBA::ULong i = 0; i < _tao_seq_len && _tao_marshal_flag; ++i)
        {
          _tao_marshal_flag = (strm >> _tao_sequence[i]);
        }
      
      return _tao_marshal_flag;
    
    }
  
  return 0;
}

#endif /* _TAO_CDR_OP_CosLifeCycle_Criteria_CPP_ */

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

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::NoFactory &_tao_aggregate
  )
{
  // First marshal the repository ID.
  if (strm << _tao_aggregate._rep_id ())
    {
      // Now marshal the members (if any).
      if (
        (strm << _tao_aggregate.search_key)
       )
        {
          return 1;
        }
      else
        {
          return 0;
        }
    }
  else
    {
      return 0;
    }
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::NoFactory &_tao_aggregate
  )
{
  // Demarshal the members.
  if (
    (strm >> _tao_aggregate.search_key)
  )
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

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

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::NotCopyable &_tao_aggregate
  )
{
  // First marshal the repository ID.
  if (strm << _tao_aggregate._rep_id ())
    {
      // Now marshal the members (if any).
      if (
        (strm << _tao_aggregate.reason.in ())
       )
        {
          return 1;
        }
      else
        {
          return 0;
        }
    }
  else
    {
      return 0;
    }
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::NotCopyable &_tao_aggregate
  )
{
  // Demarshal the members.
  if (
    (strm >> _tao_aggregate.reason.out ())
  )
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

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

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::NotMovable &_tao_aggregate
  )
{
  // First marshal the repository ID.
  if (strm << _tao_aggregate._rep_id ())
    {
      // Now marshal the members (if any).
      if (
        (strm << _tao_aggregate.reason.in ())
       )
        {
          return 1;
        }
      else
        {
          return 0;
        }
    }
  else
    {
      return 0;
    }
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::NotMovable &_tao_aggregate
  )
{
  // Demarshal the members.
  if (
    (strm >> _tao_aggregate.reason.out ())
  )
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

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

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::NotRemovable &_tao_aggregate
  )
{
  // First marshal the repository ID.
  if (strm << _tao_aggregate._rep_id ())
    {
      // Now marshal the members (if any).
      if (
        (strm << _tao_aggregate.reason.in ())
       )
        {
          return 1;
        }
      else
        {
          return 0;
        }
    }
  else
    {
      return 0;
    }
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::NotRemovable &_tao_aggregate
  )
{
  // Demarshal the members.
  if (
    (strm >> _tao_aggregate.reason.out ())
  )
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

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

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::InvalidCriteria &_tao_aggregate
  )
{
  // First marshal the repository ID.
  if (strm << _tao_aggregate._rep_id ())
    {
      // Now marshal the members (if any).
      if (
        (strm << _tao_aggregate.invalid_criteria)
       )
        {
          return 1;
        }
      else
        {
          return 0;
        }
    }
  else
    {
      return 0;
    }
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::InvalidCriteria &_tao_aggregate
  )
{
  // Demarshal the members.
  if (
    (strm >> _tao_aggregate.invalid_criteria)
  )
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

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

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CosLifeCycle::CannotMeetCriteria &_tao_aggregate
  )
{
  // First marshal the repository ID.
  if (strm << _tao_aggregate._rep_id ())
    {
      // Now marshal the members (if any).
      if (
        (strm << _tao_aggregate.unmet_criteria)
       )
        {
          return 1;
        }
      else
        {
          return 0;
        }
    }
  else
    {
      return 0;
    }
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::CannotMeetCriteria &_tao_aggregate
  )
{
  // Demarshal the members.
  if (
    (strm >> _tao_aggregate.unmet_criteria)
  )
    {
      return 1;
    }
  else
    {
      return 0;
    }
}

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

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

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::FactoryFinder_ptr &_tao_objref
  )
{
  CORBA::Object_var obj;
  
  if ((strm >> obj.inout ()) == 0)
    {
      return 0;
    }
  
  typedef ::CosLifeCycle::FactoryFinder RHS_SCOPED_NAME;
  
  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        CosLifeCycle__TAO_FactoryFinder_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 CosLifeCycle::LifeCycleObject_ptr _tao_objref
  )
{
  CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CosLifeCycle::LifeCycleObject_ptr &_tao_objref
  )
{
  CORBA::Object_var obj;
  
  if ((strm >> obj.inout ()) == 0)
    {
      return 0;
    }
  
  typedef ::CosLifeCycle::LifeCycleObject RHS_SCOPED_NAME;
  
  // Narrow to the right type.
  _tao_objref =
    TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow (
        obj.in (),
        CosLifeCycle__TAO_LifeCycleObject_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 CosLifeCycle::GenericFactory_ptr _tao_objref
  )
{
  CORBA::Object_ptr _tao_corba_obj = _tao_objref;
  return (strm << _tao_corba_obj);
}

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

