//
// CONV_FRAMEC.cpp,v 1.5 2000/03/03 02:53:23 parsons Exp
//
// ================================================================
//
// = LIBRARY
//   TAO
//
// = FILENAME
//   CONV_FRAME.cpp
//
// = DESCRIPTION
//   Generated from CONV_FRAME.pidl, that contains the OMG standarized
//   CONV_FRAME module.
//   The code was generated by the IDL compiler and then hand-crafted
//   to reduce the includes interdependencies.
//
// ================================================================

#include "tao/CONV_FRAMEC.h"
#include "tao/Any.h"

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

static const CORBA::Long _oc_CONV_FRAME_CodeSetId[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
  10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
  CORBA::tk_ulong,

};
static CORBA::TypeCode _tc_TAO_tc_CONV_FRAME_CodeSetId (CORBA::tk_alias, sizeof (_oc_CONV_FRAME_CodeSetId), (char *) &_oc_CONV_FRAME_CodeSetId, 0, sizeof (CONV_FRAME::CodeSetId));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CONV_FRAME)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_CodeSetId, &_tc_TAO_tc_CONV_FRAME_CodeSetId)
TAO_NAMESPACE_END
static const CORBA::Long _oc_CONV_FRAME_CodeSetComponent[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  44, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x6574436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e743a), ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetComponent:1.0
  17, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657443), ACE_NTOHL (0x6f6d706f), ACE_NTOHL (0x6e656e74), ACE_NTOHL (0x0),  // name = CodeSetComponent
  2, // member count
  16, ACE_NTOHL (0x6e617469), ACE_NTOHL (0x76655f63), ACE_NTOHL (0x6f64655f), ACE_NTOHL (0x73657400),  // name = native_code_set
  CORBA::tk_alias, // typecode kind for typedefs
  68, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
    10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
    CORBA::tk_ulong,


  21, ACE_NTOHL (0x636f6e76), ACE_NTOHL (0x65727369), ACE_NTOHL (0x6f6e5f63), ACE_NTOHL (0x6f64655f), ACE_NTOHL (0x73657473), ACE_NTOHL (0x0),  // name = conversion_code_sets
  CORBA::tk_sequence, // typecode kind
  84, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    CORBA::tk_alias, // typecode kind for typedefs
    68, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
      10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
      CORBA::tk_ulong,


    0,

};
static CORBA::TypeCode _tc_TAO_tc_CONV_FRAME_CodeSetComponent (CORBA::tk_struct, sizeof (_oc_CONV_FRAME_CodeSetComponent), (char *) &_oc_CONV_FRAME_CodeSetComponent, 0, sizeof (CONV_FRAME::CodeSetComponent));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CONV_FRAME)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_CodeSetComponent, &_tc_TAO_tc_CONV_FRAME_CodeSetComponent)
TAO_NAMESPACE_END

#if !defined (TAO_USE_SEQUENCE_TEMPLATES)

#if !defined (__TAO_UNBOUNDED_SEQUENCE_CONV_FRAME_CODESETCOMPONENT__TAO_SEQ_CODESETID_CS_)
#define __TAO_UNBOUNDED_SEQUENCE_CONV_FRAME_CODESETCOMPONENT__TAO_SEQ_CODESETID_CS_

  void
  CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::_allocate_buffer (CORBA::ULong length)
  {
    CORBA::ULong* tmp = CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::allocbuf (length);

    if (this->buffer_ != 0)
    {
      CORBA::ULong *old = ACE_reinterpret_cast (CORBA::ULong *,this->buffer_);

      for (CORBA::ULong i = 0; i < this->length_; ++i)
        tmp[i] = old[i];

      if (this->release_)
        CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::freebuf (old);

    }
    this->buffer_ = tmp;
  }

  void
  CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::_deallocate_buffer (void)
  {
    if (this->buffer_ == 0 || this->release_ == 0)
      return;

    CORBA::ULong *tmp = ACE_reinterpret_cast (CORBA::ULong *,this->buffer_);

    CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::freebuf (tmp);
    this->buffer_ = 0;
  }

  CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::~_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId (void) // Dtor.
  {
    this->_deallocate_buffer ();
  }


#endif /* end #if !defined */


#endif /* !TAO_USE_SEQUENCE_TEMPLATES */

#if !defined (_CONV_FRAME_CODESETCOMPONENT__TAO_SEQ_CODESETID_CS_)
#define _CONV_FRAME_CODESETCOMPONENT__TAO_SEQ_CODESETID_CS_

// *************************************************************
// CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId
// *************************************************************

CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId::_tao_seq_CodeSetId (void)
{}
CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId::_tao_seq_CodeSetId (CORBA::ULong max) // uses max size
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  _TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::ULong>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max)
{}
CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId::_tao_seq_CodeSetId (CORBA::ULong max, CORBA::ULong length, CORBA::ULong *buffer, CORBA::Boolean release)
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  _TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::ULong>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max, length, buffer, release)
{}
CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId::_tao_seq_CodeSetId (const _tao_seq_CodeSetId &seq) // copy ctor
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  _TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::ULong>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (seq)
{}
CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId::~_tao_seq_CodeSetId (void) // dtor
{}


#endif /* end #if !defined */

static const CORBA::Long _oc_CONV_FRAME_CodeSetComponentInfo[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  48, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x6574436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e7449), ACE_NTOHL (0x6e666f3a), ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetComponentInfo:1.0
  21, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657443), ACE_NTOHL (0x6f6d706f), ACE_NTOHL (0x6e656e74), ACE_NTOHL (0x496e666f), ACE_NTOHL (0x0),  // name = CodeSetComponentInfo
  2, // member count
  12, ACE_NTOHL (0x466f7243), ACE_NTOHL (0x68617244), ACE_NTOHL (0x61746100),  // name = ForCharData
  CORBA::tk_struct, // typecode kind
  296, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    44, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x6574436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e743a), ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetComponent:1.0
    17, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657443), ACE_NTOHL (0x6f6d706f), ACE_NTOHL (0x6e656e74), ACE_NTOHL (0x0),  // name = CodeSetComponent
    2, // member count
    16, ACE_NTOHL (0x6e617469), ACE_NTOHL (0x76655f63), ACE_NTOHL (0x6f64655f), ACE_NTOHL (0x73657400),  // name = native_code_set
    CORBA::tk_alias, // typecode kind for typedefs
    68, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
      10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
      CORBA::tk_ulong,


    21, ACE_NTOHL (0x636f6e76), ACE_NTOHL (0x65727369), ACE_NTOHL (0x6f6e5f63), ACE_NTOHL (0x6f64655f), ACE_NTOHL (0x73657473), ACE_NTOHL (0x0),  // name = conversion_code_sets
    CORBA::tk_sequence, // typecode kind
    84, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      CORBA::tk_alias, // typecode kind for typedefs
      68, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
        10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
        CORBA::tk_ulong,


      0,


  13, ACE_NTOHL (0x466f7257), ACE_NTOHL (0x63686172), ACE_NTOHL (0x44617461), ACE_NTOHL (0x0),  // name = ForWcharData
  CORBA::tk_struct, // typecode kind
  296, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    44, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x6574436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e743a), ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetComponent:1.0
    17, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657443), ACE_NTOHL (0x6f6d706f), ACE_NTOHL (0x6e656e74), ACE_NTOHL (0x0),  // name = CodeSetComponent
    2, // member count
    16, ACE_NTOHL (0x6e617469), ACE_NTOHL (0x76655f63), ACE_NTOHL (0x6f64655f), ACE_NTOHL (0x73657400),  // name = native_code_set
    CORBA::tk_alias, // typecode kind for typedefs
    68, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
      10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
      CORBA::tk_ulong,


    21, ACE_NTOHL (0x636f6e76), ACE_NTOHL (0x65727369), ACE_NTOHL (0x6f6e5f63), ACE_NTOHL (0x6f64655f), ACE_NTOHL (0x73657473), ACE_NTOHL (0x0),  // name = conversion_code_sets
    CORBA::tk_sequence, // typecode kind
    84, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      CORBA::tk_alias, // typecode kind for typedefs
      68, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
        10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
        CORBA::tk_ulong,


      0,


};
static CORBA::TypeCode _tc_TAO_tc_CONV_FRAME_CodeSetComponentInfo (CORBA::tk_struct, sizeof (_oc_CONV_FRAME_CodeSetComponentInfo), (char *) &_oc_CONV_FRAME_CodeSetComponentInfo, 0, sizeof (CONV_FRAME::CodeSetComponentInfo));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CONV_FRAME)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_CodeSetComponentInfo, &_tc_TAO_tc_CONV_FRAME_CodeSetComponentInfo)
TAO_NAMESPACE_END
static const CORBA::Long _oc_CONV_FRAME_CodeSetContext[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  42, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x6574436f), ACE_NTOHL (0x6e746578), ACE_NTOHL (0x743a312e), ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetContext:1.0
  15, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657443), ACE_NTOHL (0x6f6e7465), ACE_NTOHL (0x78740000),  // name = CodeSetContext
  2, // member count
  10, ACE_NTOHL (0x63686172), ACE_NTOHL (0x5f646174), ACE_NTOHL (0x61000000),  // name = char_data
  CORBA::tk_alias, // typecode kind for typedefs
  68, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
    10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
    CORBA::tk_ulong,


  11, ACE_NTOHL (0x77636861), ACE_NTOHL (0x725f6461), ACE_NTOHL (0x74610000),  // name = wchar_data
  CORBA::tk_alias, // typecode kind for typedefs
  68, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    37, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f4e56), ACE_NTOHL (0x5f465241), ACE_NTOHL (0x4d452f43), ACE_NTOHL (0x6f646553), ACE_NTOHL (0x65744964), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CONV_FRAME/CodeSetId:1.0
    10, ACE_NTOHL (0x436f6465), ACE_NTOHL (0x53657449), ACE_NTOHL (0x64000000),  // name = CodeSetId
    CORBA::tk_ulong,


};
static CORBA::TypeCode _tc_TAO_tc_CONV_FRAME_CodeSetContext (CORBA::tk_struct, sizeof (_oc_CONV_FRAME_CodeSetContext), (char *) &_oc_CONV_FRAME_CodeSetContext, 0, sizeof (CONV_FRAME::CodeSetContext));
TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (CONV_FRAME)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_CodeSetContext, &_tc_TAO_tc_CONV_FRAME_CodeSetContext)
TAO_NAMESPACE_END

void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponent &_tao_elem) // copying
{
  CONV_FRAME::CodeSetComponent *_any_val = 0;
  ACE_NEW (_any_val, CONV_FRAME::CodeSetComponent (_tao_elem));
  if (!_any_val) return;
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_any_val;
    _tao_any._tao_replace (
        CONV_FRAME::_tc_CodeSetComponent,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _any_val,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY
  {
    delete _any_val;
  }
  ACE_ENDTRY;
}

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

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

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

void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetComponentInfo &_tao_elem) // copying
{
  CONV_FRAME::CodeSetComponentInfo *_any_val = 0;
  ACE_NEW (_any_val, CONV_FRAME::CodeSetComponentInfo (_tao_elem));
  if (!_any_val) return;
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_any_val;
    _tao_any._tao_replace (
        CONV_FRAME::_tc_CodeSetComponentInfo,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _any_val,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY
  {
    delete _any_val;
  }
  ACE_ENDTRY;
}

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

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

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

void operator<<= (CORBA::Any &_tao_any, const CONV_FRAME::CodeSetContext &_tao_elem) // copying
{
  CONV_FRAME::CodeSetContext *_any_val = 0;
  ACE_NEW (_any_val, CONV_FRAME::CodeSetContext (_tao_elem));
  if (!_any_val) return;
  ACE_TRY_NEW_ENV
  {
    TAO_OutputCDR stream;
    stream << *_any_val;
    _tao_any._tao_replace (
        CONV_FRAME::_tc_CodeSetContext,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        _any_val,
        ACE_TRY_ENV
      );
    ACE_TRY_CHECK;
  }
  ACE_CATCHANY
  {
    delete _any_val;
  }
  ACE_ENDTRY;
}

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

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

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

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId &_tao_sequence
  )
{
  if (strm << _tao_sequence.length ())
  {
    // encode all elements
    return strm.write_ulong_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
  }
  return 0; // error
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    CONV_FRAME::CodeSetComponent::_tao_seq_CodeSetId &_tao_sequence
  )
{
  CORBA::ULong _tao_seq_len;
  if (strm >> _tao_seq_len)
  {
    // set the length of the sequence
    _tao_sequence.length (_tao_seq_len);
    // retrieve all the elements
    return strm.read_ulong_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
  }
  return 0; // error
}
