// -*- C++ -*-
//
// MessagingC.cpp,v 1.70 2002/01/29 20:20:32 okellogg Exp

// ****  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/
//
// Information about TAO is available at:
//     http://www.cs.wustl.edu/~schmidt/TAO.html

#include "MessagingC.h"

#if (TAO_HAS_CORBA_MESSAGING == 1)

#include "tao/Stub.h"
#include "tao/Invocation.h"
#include "tao/PortableInterceptor.h"

#if TAO_HAS_INTERCEPTORS == 1
#include "tao/RequestInfo_Util.h"
#include "tao/ClientRequestInfo_i.h"
#include "tao/ClientInterceptorAdapter.h"
#endif  /* TAO_HAS_INTERCEPTORS == 1 */

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

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

static const CORBA::Long _oc_Messaging_RebindMode[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  37,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f5265),
  ACE_NTOHL (0x62696e64),
  ACE_NTOHL (0x4d6f6465),
  ACE_NTOHL (0x3a312e30),
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/Messaging/RebindMode:1.0
  11,
  ACE_NTOHL (0x52656269),
  ACE_NTOHL (0x6e644d6f),
  ACE_NTOHL (0x64650000),  // name = RebindMode
  CORBA::tk_short,

};

static CORBA::TypeCode _tc_TAO_tc_Messaging_RebindMode (
    CORBA::tk_alias,
    sizeof (_oc_Messaging_RebindMode),
    (char *) &_oc_Messaging_RebindMode,
    0,
    sizeof (Messaging::RebindMode)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_RebindMode, &_tc_TAO_tc_Messaging_RebindMode)
TAO_NAMESPACE_END

TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, TRANSPARENT, 0)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, NO_REBIND, 1)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, NO_RECONNECT, 2)
TAO_NAMESPACE_END
static const CORBA::Long _oc_Messaging_SyncScope[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  36,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f5379),
  ACE_NTOHL (0x6e635363),
  ACE_NTOHL (0x6f70653a),
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/Messaging/SyncScope:1.0
  10,
  ACE_NTOHL (0x53796e63),
  ACE_NTOHL (0x53636f70),
  ACE_NTOHL (0x65000000),  // name = SyncScope
  CORBA::tk_short,

};

static CORBA::TypeCode _tc_TAO_tc_Messaging_SyncScope (
    CORBA::tk_alias,
    sizeof (_oc_Messaging_SyncScope),
    (char *) &_oc_Messaging_SyncScope,
    0,
    sizeof (Messaging::SyncScope)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_SyncScope, &_tc_TAO_tc_Messaging_SyncScope)
TAO_NAMESPACE_END

TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, SYNC_NONE, 0)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, SYNC_WITH_TRANSPORT, 1)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, SYNC_WITH_SERVER, 2)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, SYNC_WITH_TARGET, 3)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, SYNC_EAGER_BUFFERING, 0)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, SYNC_DELAYED_BUFFERING, -2)
TAO_NAMESPACE_END
static const CORBA::Long _oc_Messaging_RoutingType[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  38,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f526f),
  ACE_NTOHL (0x7574696e),
  ACE_NTOHL (0x67547970),
  ACE_NTOHL (0x653a312e),
  ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/Messaging/RoutingType:1.0
  12,
  ACE_NTOHL (0x526f7574),
  ACE_NTOHL (0x696e6754),
  ACE_NTOHL (0x79706500),  // name = RoutingType
  CORBA::tk_short,

};

static CORBA::TypeCode _tc_TAO_tc_Messaging_RoutingType (
    CORBA::tk_alias,
    sizeof (_oc_Messaging_RoutingType),
    (char *) &_oc_Messaging_RoutingType,
    0,
    sizeof (Messaging::RoutingType)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_RoutingType, &_tc_TAO_tc_Messaging_RoutingType)
TAO_NAMESPACE_END

TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, ROUTE_NONE, 0)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, ROUTE_FORWARD, 1)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::Short)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::Short, ROUTE_STORE_AND_FORWARD, 2)
TAO_NAMESPACE_END
static const CORBA::Long _oc_Messaging_Timeout[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  34,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f5469),
  ACE_NTOHL (0x6d656f75),
  ACE_NTOHL (0x743a312e),
  ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/Messaging/Timeout:1.0
  8,
  ACE_NTOHL (0x54696d65),
  ACE_NTOHL (0x6f757400),  // name = Timeout
  CORBA::tk_alias, // typecode kind for typedefs
  56, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    31,
    ACE_NTOHL (0x49444c3a),
    ACE_NTOHL (0x6f6d672e),
    ACE_NTOHL (0x6f72672f),
    ACE_NTOHL (0x54696d65),
    ACE_NTOHL (0x42617365),
    ACE_NTOHL (0x2f54696d),
    ACE_NTOHL (0x65543a31),
    ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/TimeBase/TimeT:1.0
    6,
    ACE_NTOHL (0x54696d65),
    ACE_NTOHL (0x54000000),  // name = TimeT
    CORBA::tk_ulonglong,


};

static CORBA::TypeCode _tc_TAO_tc_Messaging_Timeout (
    CORBA::tk_alias,
    sizeof (_oc_Messaging_Timeout),
    (char *) &_oc_Messaging_Timeout,
    0,
    sizeof (Messaging::Timeout)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Timeout, &_tc_TAO_tc_Messaging_Timeout)
TAO_NAMESPACE_END

static const CORBA::Long _oc_Messaging_Priority[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  35,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f5072),
  ACE_NTOHL (0x696f7269),
  ACE_NTOHL (0x74793a31),
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/Messaging/Priority:1.0
  9,
  ACE_NTOHL (0x5072696f),
  ACE_NTOHL (0x72697479),
  ACE_NTOHL (0x0),  // name = Priority
  CORBA::tk_short,

};

static CORBA::TypeCode _tc_TAO_tc_Messaging_Priority (
    CORBA::tk_alias,
    sizeof (_oc_Messaging_Priority),
    (char *) &_oc_Messaging_Priority,
    0,
    sizeof (Messaging::Priority)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Priority, &_tc_TAO_tc_Messaging_Priority)
TAO_NAMESPACE_END

static const CORBA::Long _oc_Messaging_Ordering[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  35,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f4f72),
  ACE_NTOHL (0x64657269),
  ACE_NTOHL (0x6e673a31),
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/Messaging/Ordering:1.0
  9,
  ACE_NTOHL (0x4f726465),
  ACE_NTOHL (0x72696e67),
  ACE_NTOHL (0x0),  // name = Ordering
  CORBA::tk_ushort,

};

static CORBA::TypeCode _tc_TAO_tc_Messaging_Ordering (
    CORBA::tk_alias,
    sizeof (_oc_Messaging_Ordering),
    (char *) &_oc_Messaging_Ordering,
    0,
    sizeof (Messaging::Ordering)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Ordering, &_tc_TAO_tc_Messaging_Ordering)
TAO_NAMESPACE_END

TAO_NAMESPACE_TYPE (const CORBA::UShort)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::UShort, ORDER_ANY, 1U)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::UShort)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::UShort, ORDER_TEMPORAL, 2U)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::UShort)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::UShort, ORDER_PRIORITY, 4U)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::UShort)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::UShort, ORDER_DEADLINE, 8U)
TAO_NAMESPACE_END

#if (TAO_HAS_REBIND_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, REBIND_POLICY_TYPE, 23U)
TAO_NAMESPACE_END

int Messaging::RebindPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::RebindPolicy_var
// *************************************************************

Messaging::RebindPolicy_var::RebindPolicy_var (void) // default constructor
  : ptr_ (RebindPolicy::_nil ())
{}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::RebindPolicy_var::RebindPolicy_var (const ::Messaging::RebindPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (RebindPolicy::_duplicate (p.ptr ()))
{}

Messaging::RebindPolicy_var::~RebindPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::RebindPolicy_var &
Messaging::RebindPolicy_var::operator= (RebindPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::RebindPolicy_var &
Messaging::RebindPolicy_var::operator= (const ::Messaging::RebindPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::RebindPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::RebindPolicy_var::operator const ::Messaging::RebindPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::RebindPolicy_var::operator ::Messaging::RebindPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::RebindPolicy_ptr &
Messaging::RebindPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::RebindPolicy_ptr &
Messaging::RebindPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RebindPolicy::_nil ();
  return this->ptr_;
}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::RebindPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::RebindPolicy::_nil ();
  return val;
}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_var::tao_duplicate (RebindPolicy_ptr p)
{
  return ::Messaging::RebindPolicy::_duplicate (p);
}

void
Messaging::RebindPolicy_var::tao_release (RebindPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_var::tao_nil (void)
{
  return ::Messaging::RebindPolicy::_nil ();
}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::RebindPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::RebindPolicy_var::tao_upcast (void *src)
{
  RebindPolicy **tmp =
    ACE_static_cast (RebindPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::RebindPolicy_out
// *************************************************************

Messaging::RebindPolicy_out::RebindPolicy_out (RebindPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::RebindPolicy::_nil ();
}

Messaging::RebindPolicy_out::RebindPolicy_out (RebindPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RebindPolicy::_nil ();
}

Messaging::RebindPolicy_out::RebindPolicy_out (const ::Messaging::RebindPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (RebindPolicy_out &, p).ptr_)
{}

::Messaging::RebindPolicy_out &
Messaging::RebindPolicy_out::operator= (const ::Messaging::RebindPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (RebindPolicy_out&, p).ptr_;
  return *this;
}

Messaging::RebindPolicy_out &
Messaging::RebindPolicy_out::operator= (const ::Messaging::RebindPolicy_var &p)
{
  this->ptr_ = ::Messaging::RebindPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::RebindPolicy_out &
Messaging::RebindPolicy_out::operator= (RebindPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::RebindPolicy_out::operator ::Messaging::RebindPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RebindPolicy_ptr &
Messaging::RebindPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::RebindPolicy_ptr
Messaging::RebindPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::RebindPolicy::RebindPolicy ()
{
  }

// destructor
Messaging::RebindPolicy::~RebindPolicy (void)
{}

Messaging::RebindPolicy_ptr Messaging::RebindPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return RebindPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::RebindPolicy_ptr Messaging::RebindPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return RebindPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          RebindPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &RebindPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::RebindPolicy_ptr
Messaging::RebindPolicy::_duplicate (RebindPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::RebindPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, RebindPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#if (TAO_HAS_SYNC_SCOPE_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, SYNC_SCOPE_POLICY_TYPE, 24U)
TAO_NAMESPACE_END

int Messaging::SyncScopePolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::SyncScopePolicy_var
// *************************************************************

Messaging::SyncScopePolicy_var::SyncScopePolicy_var (void) // default constructor
  : ptr_ (SyncScopePolicy::_nil ())
{}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_var::ptr (void) const
{
  return this->ptr_;
}

#endif /* TAO_HAS_REBIND_POLICY == 1 */

Messaging::SyncScopePolicy_var::SyncScopePolicy_var (const ::Messaging::SyncScopePolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (SyncScopePolicy::_duplicate (p.ptr ()))
{}

Messaging::SyncScopePolicy_var::~SyncScopePolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::SyncScopePolicy_var &
Messaging::SyncScopePolicy_var::operator= (SyncScopePolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::SyncScopePolicy_var &
Messaging::SyncScopePolicy_var::operator= (const ::Messaging::SyncScopePolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::SyncScopePolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::SyncScopePolicy_var::operator const ::Messaging::SyncScopePolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::SyncScopePolicy_var::operator ::Messaging::SyncScopePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::SyncScopePolicy_ptr &
Messaging::SyncScopePolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::SyncScopePolicy_ptr &
Messaging::SyncScopePolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::SyncScopePolicy::_nil ();
  return this->ptr_;
}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::SyncScopePolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::SyncScopePolicy::_nil ();
  return val;
}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_var::tao_duplicate (SyncScopePolicy_ptr p)
{
  return ::Messaging::SyncScopePolicy::_duplicate (p);
}

void
Messaging::SyncScopePolicy_var::tao_release (SyncScopePolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_var::tao_nil (void)
{
  return ::Messaging::SyncScopePolicy::_nil ();
}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::SyncScopePolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::SyncScopePolicy_var::tao_upcast (void *src)
{
  SyncScopePolicy **tmp =
    ACE_static_cast (SyncScopePolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::SyncScopePolicy_out
// *************************************************************

Messaging::SyncScopePolicy_out::SyncScopePolicy_out (SyncScopePolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::SyncScopePolicy::_nil ();
}

Messaging::SyncScopePolicy_out::SyncScopePolicy_out (SyncScopePolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::SyncScopePolicy::_nil ();
}

Messaging::SyncScopePolicy_out::SyncScopePolicy_out (const ::Messaging::SyncScopePolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (SyncScopePolicy_out &, p).ptr_)
{}

::Messaging::SyncScopePolicy_out &
Messaging::SyncScopePolicy_out::operator= (const ::Messaging::SyncScopePolicy_out &p)
{
  this->ptr_ = ACE_const_cast (SyncScopePolicy_out&, p).ptr_;
  return *this;
}

Messaging::SyncScopePolicy_out &
Messaging::SyncScopePolicy_out::operator= (const ::Messaging::SyncScopePolicy_var &p)
{
  this->ptr_ = ::Messaging::SyncScopePolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::SyncScopePolicy_out &
Messaging::SyncScopePolicy_out::operator= (SyncScopePolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::SyncScopePolicy_out::operator ::Messaging::SyncScopePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::SyncScopePolicy_ptr &
Messaging::SyncScopePolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy_out::operator-> (void)
{
  return this->ptr_;
}

// default constructor
Messaging::SyncScopePolicy::SyncScopePolicy ()
{
  }

// destructor
Messaging::SyncScopePolicy::~SyncScopePolicy (void)
{}

Messaging::SyncScopePolicy_ptr Messaging::SyncScopePolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return SyncScopePolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::SyncScopePolicy_ptr Messaging::SyncScopePolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return SyncScopePolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          SyncScopePolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &SyncScopePolicy::_tao_class_id
                  )
              )
        );
}

Messaging::SyncScopePolicy_ptr
Messaging::SyncScopePolicy::_duplicate (SyncScopePolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::SyncScopePolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, SyncScopePolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_SYNC_SCOPE_POLICY == 1 */

#if (TAO_HAS_PRIORITY_POLICIES == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, REQUEST_PRIORITY_POLICY_TYPE, 25U)
TAO_NAMESPACE_END
static const CORBA::Long _oc_Messaging_PriorityRange[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  40,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f5072),
  ACE_NTOHL (0x696f7269),
  ACE_NTOHL (0x74795261),
  ACE_NTOHL (0x6e67653a),
  ACE_NTOHL (0x312e3000),  // repository ID = IDL:omg.org/Messaging/PriorityRange:1.0
  14,
  ACE_NTOHL (0x5072696f),
  ACE_NTOHL (0x72697479),
  ACE_NTOHL (0x52616e67),
  ACE_NTOHL (0x65000000),  // name = PriorityRange
  2, // member count
  4,
  ACE_NTOHL (0x6d696e00),  // name = min
  CORBA::tk_alias, // typecode kind for typedefs
  64, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    35,
    ACE_NTOHL (0x49444c3a),
    ACE_NTOHL (0x6f6d672e),
    ACE_NTOHL (0x6f72672f),
    ACE_NTOHL (0x4d657373),
    ACE_NTOHL (0x6167696e),
    ACE_NTOHL (0x672f5072),
    ACE_NTOHL (0x696f7269),
    ACE_NTOHL (0x74793a31),
    ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/Messaging/Priority:1.0
    9,
    ACE_NTOHL (0x5072696f),
    ACE_NTOHL (0x72697479),
    ACE_NTOHL (0x0),  // name = Priority
    CORBA::tk_short,


  4,
  ACE_NTOHL (0x6d617800),  // name = max
  CORBA::tk_alias, // typecode kind for typedefs
  64, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    35,
    ACE_NTOHL (0x49444c3a),
    ACE_NTOHL (0x6f6d672e),
    ACE_NTOHL (0x6f72672f),
    ACE_NTOHL (0x4d657373),
    ACE_NTOHL (0x6167696e),
    ACE_NTOHL (0x672f5072),
    ACE_NTOHL (0x696f7269),
    ACE_NTOHL (0x74793a31),
    ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/Messaging/Priority:1.0
    9,
    ACE_NTOHL (0x5072696f),
    ACE_NTOHL (0x72697479),
    ACE_NTOHL (0x0),  // name = Priority
    CORBA::tk_short,


};

static CORBA::TypeCode _tc_TAO_tc_Messaging_PriorityRange (
    CORBA::tk_struct,
    sizeof (_oc_Messaging_PriorityRange),
    (char *) &_oc_Messaging_PriorityRange,
    0,
    sizeof (Messaging::PriorityRange)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PriorityRange, &_tc_TAO_tc_Messaging_PriorityRange)
TAO_NAMESPACE_END

void Messaging::PriorityRange::_tao_any_destructor (void *x)
{
  PriorityRange *tmp = ACE_static_cast (PriorityRange*,x);
  delete tmp;
}


int Messaging::RequestPriorityPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::RequestPriorityPolicy_var
// *************************************************************

Messaging::RequestPriorityPolicy_var::RequestPriorityPolicy_var (void) // default constructor
  : ptr_ (RequestPriorityPolicy::_nil ())
{}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::RequestPriorityPolicy_var::RequestPriorityPolicy_var (const ::Messaging::RequestPriorityPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (RequestPriorityPolicy::_duplicate (p.ptr ()))
{}

Messaging::RequestPriorityPolicy_var::~RequestPriorityPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::RequestPriorityPolicy_var &
Messaging::RequestPriorityPolicy_var::operator= (RequestPriorityPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::RequestPriorityPolicy_var &
Messaging::RequestPriorityPolicy_var::operator= (const ::Messaging::RequestPriorityPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::RequestPriorityPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::RequestPriorityPolicy_var::operator const ::Messaging::RequestPriorityPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::RequestPriorityPolicy_var::operator ::Messaging::RequestPriorityPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::RequestPriorityPolicy_ptr &
Messaging::RequestPriorityPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::RequestPriorityPolicy_ptr &
Messaging::RequestPriorityPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RequestPriorityPolicy::_nil ();
  return this->ptr_;
}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::RequestPriorityPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::RequestPriorityPolicy::_nil ();
  return val;
}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_var::tao_duplicate (RequestPriorityPolicy_ptr p)
{
  return ::Messaging::RequestPriorityPolicy::_duplicate (p);
}

void
Messaging::RequestPriorityPolicy_var::tao_release (RequestPriorityPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_var::tao_nil (void)
{
  return ::Messaging::RequestPriorityPolicy::_nil ();
}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::RequestPriorityPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::RequestPriorityPolicy_var::tao_upcast (void *src)
{
  RequestPriorityPolicy **tmp =
    ACE_static_cast (RequestPriorityPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::RequestPriorityPolicy_out
// *************************************************************

Messaging::RequestPriorityPolicy_out::RequestPriorityPolicy_out (RequestPriorityPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::RequestPriorityPolicy::_nil ();
}

Messaging::RequestPriorityPolicy_out::RequestPriorityPolicy_out (RequestPriorityPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RequestPriorityPolicy::_nil ();
}

Messaging::RequestPriorityPolicy_out::RequestPriorityPolicy_out (const ::Messaging::RequestPriorityPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (RequestPriorityPolicy_out &, p).ptr_)
{}

::Messaging::RequestPriorityPolicy_out &
Messaging::RequestPriorityPolicy_out::operator= (const ::Messaging::RequestPriorityPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (RequestPriorityPolicy_out&, p).ptr_;
  return *this;
}

Messaging::RequestPriorityPolicy_out &
Messaging::RequestPriorityPolicy_out::operator= (const ::Messaging::RequestPriorityPolicy_var &p)
{
  this->ptr_ = ::Messaging::RequestPriorityPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::RequestPriorityPolicy_out &
Messaging::RequestPriorityPolicy_out::operator= (RequestPriorityPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::RequestPriorityPolicy_out::operator ::Messaging::RequestPriorityPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RequestPriorityPolicy_ptr &
Messaging::RequestPriorityPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::RequestPriorityPolicy::RequestPriorityPolicy ()
{
  }

// destructor
Messaging::RequestPriorityPolicy::~RequestPriorityPolicy (void)
{}

Messaging::RequestPriorityPolicy_ptr Messaging::RequestPriorityPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return RequestPriorityPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::RequestPriorityPolicy_ptr Messaging::RequestPriorityPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return RequestPriorityPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          RequestPriorityPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &RequestPriorityPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::RequestPriorityPolicy_ptr
Messaging::RequestPriorityPolicy::_duplicate (RequestPriorityPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::RequestPriorityPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, RequestPriorityPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, REPLY_PRIORITY_POLICY_TYPE, 26U)
TAO_NAMESPACE_END

int Messaging::ReplyPriorityPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::ReplyPriorityPolicy_var
// *************************************************************

Messaging::ReplyPriorityPolicy_var::ReplyPriorityPolicy_var (void) // default constructor
  : ptr_ (ReplyPriorityPolicy::_nil ())
{}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::ReplyPriorityPolicy_var::ReplyPriorityPolicy_var (const ::Messaging::ReplyPriorityPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (ReplyPriorityPolicy::_duplicate (p.ptr ()))
{}

Messaging::ReplyPriorityPolicy_var::~ReplyPriorityPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::ReplyPriorityPolicy_var &
Messaging::ReplyPriorityPolicy_var::operator= (ReplyPriorityPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyPriorityPolicy_var &
Messaging::ReplyPriorityPolicy_var::operator= (const ::Messaging::ReplyPriorityPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::ReplyPriorityPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::ReplyPriorityPolicy_var::operator const ::Messaging::ReplyPriorityPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::ReplyPriorityPolicy_var::operator ::Messaging::ReplyPriorityPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::ReplyPriorityPolicy_ptr &
Messaging::ReplyPriorityPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::ReplyPriorityPolicy_ptr &
Messaging::ReplyPriorityPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyPriorityPolicy::_nil ();
  return this->ptr_;
}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::ReplyPriorityPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::ReplyPriorityPolicy::_nil ();
  return val;
}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_var::tao_duplicate (ReplyPriorityPolicy_ptr p)
{
  return ::Messaging::ReplyPriorityPolicy::_duplicate (p);
}

void
Messaging::ReplyPriorityPolicy_var::tao_release (ReplyPriorityPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_var::tao_nil (void)
{
  return ::Messaging::ReplyPriorityPolicy::_nil ();
}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::ReplyPriorityPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::ReplyPriorityPolicy_var::tao_upcast (void *src)
{
  ReplyPriorityPolicy **tmp =
    ACE_static_cast (ReplyPriorityPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::ReplyPriorityPolicy_out
// *************************************************************

Messaging::ReplyPriorityPolicy_out::ReplyPriorityPolicy_out (ReplyPriorityPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::ReplyPriorityPolicy::_nil ();
}

Messaging::ReplyPriorityPolicy_out::ReplyPriorityPolicy_out (ReplyPriorityPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyPriorityPolicy::_nil ();
}

Messaging::ReplyPriorityPolicy_out::ReplyPriorityPolicy_out (const ::Messaging::ReplyPriorityPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (ReplyPriorityPolicy_out &, p).ptr_)
{}

::Messaging::ReplyPriorityPolicy_out &
Messaging::ReplyPriorityPolicy_out::operator= (const ::Messaging::ReplyPriorityPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (ReplyPriorityPolicy_out&, p).ptr_;
  return *this;
}

Messaging::ReplyPriorityPolicy_out &
Messaging::ReplyPriorityPolicy_out::operator= (const ::Messaging::ReplyPriorityPolicy_var &p)
{
  this->ptr_ = ::Messaging::ReplyPriorityPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::ReplyPriorityPolicy_out &
Messaging::ReplyPriorityPolicy_out::operator= (ReplyPriorityPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyPriorityPolicy_out::operator ::Messaging::ReplyPriorityPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyPriorityPolicy_ptr &
Messaging::ReplyPriorityPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::ReplyPriorityPolicy::ReplyPriorityPolicy ()
{
  }

// destructor
Messaging::ReplyPriorityPolicy::~ReplyPriorityPolicy (void)
{}

Messaging::ReplyPriorityPolicy_ptr Messaging::ReplyPriorityPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return ReplyPriorityPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::ReplyPriorityPolicy_ptr Messaging::ReplyPriorityPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return ReplyPriorityPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          ReplyPriorityPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &ReplyPriorityPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::ReplyPriorityPolicy_ptr
Messaging::ReplyPriorityPolicy::_duplicate (ReplyPriorityPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::ReplyPriorityPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, ReplyPriorityPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_PRIORITY_POLICIES == 1 */

#if (TAO_HAS_REQUEST_START_TIME_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, REQUEST_START_TIME_POLICY_TYPE, 27U)
TAO_NAMESPACE_END

int Messaging::RequestStartTimePolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::RequestStartTimePolicy_var
// *************************************************************

Messaging::RequestStartTimePolicy_var::RequestStartTimePolicy_var (void) // default constructor
  : ptr_ (RequestStartTimePolicy::_nil ())
{}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::RequestStartTimePolicy_var::RequestStartTimePolicy_var (const ::Messaging::RequestStartTimePolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (RequestStartTimePolicy::_duplicate (p.ptr ()))
{}

Messaging::RequestStartTimePolicy_var::~RequestStartTimePolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::RequestStartTimePolicy_var &
Messaging::RequestStartTimePolicy_var::operator= (RequestStartTimePolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::RequestStartTimePolicy_var &
Messaging::RequestStartTimePolicy_var::operator= (const ::Messaging::RequestStartTimePolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::RequestStartTimePolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::RequestStartTimePolicy_var::operator const ::Messaging::RequestStartTimePolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::RequestStartTimePolicy_var::operator ::Messaging::RequestStartTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::RequestStartTimePolicy_ptr &
Messaging::RequestStartTimePolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::RequestStartTimePolicy_ptr &
Messaging::RequestStartTimePolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RequestStartTimePolicy::_nil ();
  return this->ptr_;
}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::RequestStartTimePolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::RequestStartTimePolicy::_nil ();
  return val;
}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_var::tao_duplicate (RequestStartTimePolicy_ptr p)
{
  return ::Messaging::RequestStartTimePolicy::_duplicate (p);
}

void
Messaging::RequestStartTimePolicy_var::tao_release (RequestStartTimePolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_var::tao_nil (void)
{
  return ::Messaging::RequestStartTimePolicy::_nil ();
}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::RequestStartTimePolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::RequestStartTimePolicy_var::tao_upcast (void *src)
{
  RequestStartTimePolicy **tmp =
    ACE_static_cast (RequestStartTimePolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::RequestStartTimePolicy_out
// *************************************************************

Messaging::RequestStartTimePolicy_out::RequestStartTimePolicy_out (RequestStartTimePolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::RequestStartTimePolicy::_nil ();
}

Messaging::RequestStartTimePolicy_out::RequestStartTimePolicy_out (RequestStartTimePolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RequestStartTimePolicy::_nil ();
}

Messaging::RequestStartTimePolicy_out::RequestStartTimePolicy_out (const ::Messaging::RequestStartTimePolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (RequestStartTimePolicy_out &, p).ptr_)
{}

::Messaging::RequestStartTimePolicy_out &
Messaging::RequestStartTimePolicy_out::operator= (const ::Messaging::RequestStartTimePolicy_out &p)
{
  this->ptr_ = ACE_const_cast (RequestStartTimePolicy_out&, p).ptr_;
  return *this;
}

Messaging::RequestStartTimePolicy_out &
Messaging::RequestStartTimePolicy_out::operator= (const ::Messaging::RequestStartTimePolicy_var &p)
{
  this->ptr_ = ::Messaging::RequestStartTimePolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::RequestStartTimePolicy_out &
Messaging::RequestStartTimePolicy_out::operator= (RequestStartTimePolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::RequestStartTimePolicy_out::operator ::Messaging::RequestStartTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RequestStartTimePolicy_ptr &
Messaging::RequestStartTimePolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::RequestStartTimePolicy::RequestStartTimePolicy ()
{
  }

// destructor
Messaging::RequestStartTimePolicy::~RequestStartTimePolicy (void)
{}

Messaging::RequestStartTimePolicy_ptr Messaging::RequestStartTimePolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return RequestStartTimePolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::RequestStartTimePolicy_ptr Messaging::RequestStartTimePolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return RequestStartTimePolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          RequestStartTimePolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &RequestStartTimePolicy::_tao_class_id
                  )
              )
        );
}

Messaging::RequestStartTimePolicy_ptr
Messaging::RequestStartTimePolicy::_duplicate (RequestStartTimePolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::RequestStartTimePolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, RequestStartTimePolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_REQUEST_START_TIME_POLICY == 1 */

#if (TAO_HAS_REQUEST_END_TIME_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, REQUEST_END_TIME_POLICY_TYPE, 28U)
TAO_NAMESPACE_END

int Messaging::RequestEndTimePolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::RequestEndTimePolicy_var
// *************************************************************

Messaging::RequestEndTimePolicy_var::RequestEndTimePolicy_var (void) // default constructor
  : ptr_ (RequestEndTimePolicy::_nil ())
{}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::RequestEndTimePolicy_var::RequestEndTimePolicy_var (const ::Messaging::RequestEndTimePolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (RequestEndTimePolicy::_duplicate (p.ptr ()))
{}

Messaging::RequestEndTimePolicy_var::~RequestEndTimePolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::RequestEndTimePolicy_var &
Messaging::RequestEndTimePolicy_var::operator= (RequestEndTimePolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::RequestEndTimePolicy_var &
Messaging::RequestEndTimePolicy_var::operator= (const ::Messaging::RequestEndTimePolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::RequestEndTimePolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::RequestEndTimePolicy_var::operator const ::Messaging::RequestEndTimePolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::RequestEndTimePolicy_var::operator ::Messaging::RequestEndTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::RequestEndTimePolicy_ptr &
Messaging::RequestEndTimePolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::RequestEndTimePolicy_ptr &
Messaging::RequestEndTimePolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RequestEndTimePolicy::_nil ();
  return this->ptr_;
}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::RequestEndTimePolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::RequestEndTimePolicy::_nil ();
  return val;
}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_var::tao_duplicate (RequestEndTimePolicy_ptr p)
{
  return ::Messaging::RequestEndTimePolicy::_duplicate (p);
}

void
Messaging::RequestEndTimePolicy_var::tao_release (RequestEndTimePolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_var::tao_nil (void)
{
  return ::Messaging::RequestEndTimePolicy::_nil ();
}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::RequestEndTimePolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::RequestEndTimePolicy_var::tao_upcast (void *src)
{
  RequestEndTimePolicy **tmp =
    ACE_static_cast (RequestEndTimePolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::RequestEndTimePolicy_out
// *************************************************************

Messaging::RequestEndTimePolicy_out::RequestEndTimePolicy_out (RequestEndTimePolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::RequestEndTimePolicy::_nil ();
}

Messaging::RequestEndTimePolicy_out::RequestEndTimePolicy_out (RequestEndTimePolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RequestEndTimePolicy::_nil ();
}

Messaging::RequestEndTimePolicy_out::RequestEndTimePolicy_out (const ::Messaging::RequestEndTimePolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (RequestEndTimePolicy_out &, p).ptr_)
{}

::Messaging::RequestEndTimePolicy_out &
Messaging::RequestEndTimePolicy_out::operator= (const ::Messaging::RequestEndTimePolicy_out &p)
{
  this->ptr_ = ACE_const_cast (RequestEndTimePolicy_out&, p).ptr_;
  return *this;
}

Messaging::RequestEndTimePolicy_out &
Messaging::RequestEndTimePolicy_out::operator= (const ::Messaging::RequestEndTimePolicy_var &p)
{
  this->ptr_ = ::Messaging::RequestEndTimePolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::RequestEndTimePolicy_out &
Messaging::RequestEndTimePolicy_out::operator= (RequestEndTimePolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::RequestEndTimePolicy_out::operator ::Messaging::RequestEndTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RequestEndTimePolicy_ptr &
Messaging::RequestEndTimePolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::RequestEndTimePolicy::RequestEndTimePolicy ()
{
  }

// destructor
Messaging::RequestEndTimePolicy::~RequestEndTimePolicy (void)
{}

Messaging::RequestEndTimePolicy_ptr Messaging::RequestEndTimePolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return RequestEndTimePolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::RequestEndTimePolicy_ptr Messaging::RequestEndTimePolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return RequestEndTimePolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          RequestEndTimePolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &RequestEndTimePolicy::_tao_class_id
                  )
              )
        );
}

Messaging::RequestEndTimePolicy_ptr
Messaging::RequestEndTimePolicy::_duplicate (RequestEndTimePolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::RequestEndTimePolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, RequestEndTimePolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_REQUEST_END_TIME_POLICY == 1 */

#if (TAO_HAS_REPLY_START_TIME_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, REPLY_START_TIME_POLICY_TYPE, 29U)
TAO_NAMESPACE_END

int Messaging::ReplyStartTimePolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::ReplyStartTimePolicy_var
// *************************************************************

Messaging::ReplyStartTimePolicy_var::ReplyStartTimePolicy_var (void) // default constructor
  : ptr_ (ReplyStartTimePolicy::_nil ())
{}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::ReplyStartTimePolicy_var::ReplyStartTimePolicy_var (const ::Messaging::ReplyStartTimePolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (ReplyStartTimePolicy::_duplicate (p.ptr ()))
{}

Messaging::ReplyStartTimePolicy_var::~ReplyStartTimePolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::ReplyStartTimePolicy_var &
Messaging::ReplyStartTimePolicy_var::operator= (ReplyStartTimePolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyStartTimePolicy_var &
Messaging::ReplyStartTimePolicy_var::operator= (const ::Messaging::ReplyStartTimePolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::ReplyStartTimePolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::ReplyStartTimePolicy_var::operator const ::Messaging::ReplyStartTimePolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::ReplyStartTimePolicy_var::operator ::Messaging::ReplyStartTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::ReplyStartTimePolicy_ptr &
Messaging::ReplyStartTimePolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::ReplyStartTimePolicy_ptr &
Messaging::ReplyStartTimePolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyStartTimePolicy::_nil ();
  return this->ptr_;
}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::ReplyStartTimePolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::ReplyStartTimePolicy::_nil ();
  return val;
}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_var::tao_duplicate (ReplyStartTimePolicy_ptr p)
{
  return ::Messaging::ReplyStartTimePolicy::_duplicate (p);
}

void
Messaging::ReplyStartTimePolicy_var::tao_release (ReplyStartTimePolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_var::tao_nil (void)
{
  return ::Messaging::ReplyStartTimePolicy::_nil ();
}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::ReplyStartTimePolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::ReplyStartTimePolicy_var::tao_upcast (void *src)
{
  ReplyStartTimePolicy **tmp =
    ACE_static_cast (ReplyStartTimePolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::ReplyStartTimePolicy_out
// *************************************************************

Messaging::ReplyStartTimePolicy_out::ReplyStartTimePolicy_out (ReplyStartTimePolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::ReplyStartTimePolicy::_nil ();
}

Messaging::ReplyStartTimePolicy_out::ReplyStartTimePolicy_out (ReplyStartTimePolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyStartTimePolicy::_nil ();
}

Messaging::ReplyStartTimePolicy_out::ReplyStartTimePolicy_out (const ::Messaging::ReplyStartTimePolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (ReplyStartTimePolicy_out &, p).ptr_)
{}

::Messaging::ReplyStartTimePolicy_out &
Messaging::ReplyStartTimePolicy_out::operator= (const ::Messaging::ReplyStartTimePolicy_out &p)
{
  this->ptr_ = ACE_const_cast (ReplyStartTimePolicy_out&, p).ptr_;
  return *this;
}

Messaging::ReplyStartTimePolicy_out &
Messaging::ReplyStartTimePolicy_out::operator= (const ::Messaging::ReplyStartTimePolicy_var &p)
{
  this->ptr_ = ::Messaging::ReplyStartTimePolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::ReplyStartTimePolicy_out &
Messaging::ReplyStartTimePolicy_out::operator= (ReplyStartTimePolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyStartTimePolicy_out::operator ::Messaging::ReplyStartTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyStartTimePolicy_ptr &
Messaging::ReplyStartTimePolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::ReplyStartTimePolicy::ReplyStartTimePolicy ()
{
  }

// destructor
Messaging::ReplyStartTimePolicy::~ReplyStartTimePolicy (void)
{}

Messaging::ReplyStartTimePolicy_ptr Messaging::ReplyStartTimePolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return ReplyStartTimePolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::ReplyStartTimePolicy_ptr Messaging::ReplyStartTimePolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return ReplyStartTimePolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          ReplyStartTimePolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &ReplyStartTimePolicy::_tao_class_id
                  )
              )
        );
}

Messaging::ReplyStartTimePolicy_ptr
Messaging::ReplyStartTimePolicy::_duplicate (ReplyStartTimePolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::ReplyStartTimePolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, ReplyStartTimePolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_REPLY_START_TIME_POLICY == 1 */

#if (TAO_HAS_REPLY_END_TIME_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, REPLY_END_TIME_POLICY_TYPE, 30U)
TAO_NAMESPACE_END

int Messaging::ReplyEndTimePolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::ReplyEndTimePolicy_var
// *************************************************************

Messaging::ReplyEndTimePolicy_var::ReplyEndTimePolicy_var (void) // default constructor
  : ptr_ (ReplyEndTimePolicy::_nil ())
{}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::ReplyEndTimePolicy_var::ReplyEndTimePolicy_var (const ::Messaging::ReplyEndTimePolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (ReplyEndTimePolicy::_duplicate (p.ptr ()))
{}

Messaging::ReplyEndTimePolicy_var::~ReplyEndTimePolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::ReplyEndTimePolicy_var &
Messaging::ReplyEndTimePolicy_var::operator= (ReplyEndTimePolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyEndTimePolicy_var &
Messaging::ReplyEndTimePolicy_var::operator= (const ::Messaging::ReplyEndTimePolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::ReplyEndTimePolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::ReplyEndTimePolicy_var::operator const ::Messaging::ReplyEndTimePolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::ReplyEndTimePolicy_var::operator ::Messaging::ReplyEndTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::ReplyEndTimePolicy_ptr &
Messaging::ReplyEndTimePolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::ReplyEndTimePolicy_ptr &
Messaging::ReplyEndTimePolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyEndTimePolicy::_nil ();
  return this->ptr_;
}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::ReplyEndTimePolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::ReplyEndTimePolicy::_nil ();
  return val;
}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_var::tao_duplicate (ReplyEndTimePolicy_ptr p)
{
  return ::Messaging::ReplyEndTimePolicy::_duplicate (p);
}

void
Messaging::ReplyEndTimePolicy_var::tao_release (ReplyEndTimePolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_var::tao_nil (void)
{
  return ::Messaging::ReplyEndTimePolicy::_nil ();
}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::ReplyEndTimePolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::ReplyEndTimePolicy_var::tao_upcast (void *src)
{
  ReplyEndTimePolicy **tmp =
    ACE_static_cast (ReplyEndTimePolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::ReplyEndTimePolicy_out
// *************************************************************

Messaging::ReplyEndTimePolicy_out::ReplyEndTimePolicy_out (ReplyEndTimePolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::ReplyEndTimePolicy::_nil ();
}

Messaging::ReplyEndTimePolicy_out::ReplyEndTimePolicy_out (ReplyEndTimePolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyEndTimePolicy::_nil ();
}

Messaging::ReplyEndTimePolicy_out::ReplyEndTimePolicy_out (const ::Messaging::ReplyEndTimePolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (ReplyEndTimePolicy_out &, p).ptr_)
{}

::Messaging::ReplyEndTimePolicy_out &
Messaging::ReplyEndTimePolicy_out::operator= (const ::Messaging::ReplyEndTimePolicy_out &p)
{
  this->ptr_ = ACE_const_cast (ReplyEndTimePolicy_out&, p).ptr_;
  return *this;
}

Messaging::ReplyEndTimePolicy_out &
Messaging::ReplyEndTimePolicy_out::operator= (const ::Messaging::ReplyEndTimePolicy_var &p)
{
  this->ptr_ = ::Messaging::ReplyEndTimePolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::ReplyEndTimePolicy_out &
Messaging::ReplyEndTimePolicy_out::operator= (ReplyEndTimePolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyEndTimePolicy_out::operator ::Messaging::ReplyEndTimePolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyEndTimePolicy_ptr &
Messaging::ReplyEndTimePolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::ReplyEndTimePolicy::ReplyEndTimePolicy ()
{
  }

// destructor
Messaging::ReplyEndTimePolicy::~ReplyEndTimePolicy (void)
{}

Messaging::ReplyEndTimePolicy_ptr Messaging::ReplyEndTimePolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return ReplyEndTimePolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::ReplyEndTimePolicy_ptr Messaging::ReplyEndTimePolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return ReplyEndTimePolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          ReplyEndTimePolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &ReplyEndTimePolicy::_tao_class_id
                  )
              )
        );
}

Messaging::ReplyEndTimePolicy_ptr
Messaging::ReplyEndTimePolicy::_duplicate (ReplyEndTimePolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::ReplyEndTimePolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, ReplyEndTimePolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_REPLY_END_TIME_POLICY == 1 */

#if (TAO_HAS_RELATIVE_REQUEST_TIMEOUT_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, RELATIVE_REQ_TIMEOUT_POLICY_TYPE, 31U)
TAO_NAMESPACE_END

int Messaging::RelativeRequestTimeoutPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::RelativeRequestTimeoutPolicy_var
// *************************************************************

Messaging::RelativeRequestTimeoutPolicy_var::RelativeRequestTimeoutPolicy_var (void) // default constructor
  : ptr_ (RelativeRequestTimeoutPolicy::_nil ())
{}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::RelativeRequestTimeoutPolicy_var::RelativeRequestTimeoutPolicy_var (const ::Messaging::RelativeRequestTimeoutPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (RelativeRequestTimeoutPolicy::_duplicate (p.ptr ()))
{}

Messaging::RelativeRequestTimeoutPolicy_var::~RelativeRequestTimeoutPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::RelativeRequestTimeoutPolicy_var &
Messaging::RelativeRequestTimeoutPolicy_var::operator= (RelativeRequestTimeoutPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::RelativeRequestTimeoutPolicy_var &
Messaging::RelativeRequestTimeoutPolicy_var::operator= (const ::Messaging::RelativeRequestTimeoutPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::RelativeRequestTimeoutPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::RelativeRequestTimeoutPolicy_var::operator const ::Messaging::RelativeRequestTimeoutPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::RelativeRequestTimeoutPolicy_var::operator ::Messaging::RelativeRequestTimeoutPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr &
Messaging::RelativeRequestTimeoutPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr &
Messaging::RelativeRequestTimeoutPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RelativeRequestTimeoutPolicy::_nil ();
  return this->ptr_;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::RelativeRequestTimeoutPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::RelativeRequestTimeoutPolicy::_nil ();
  return val;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_var::tao_duplicate (RelativeRequestTimeoutPolicy_ptr p)
{
  return ::Messaging::RelativeRequestTimeoutPolicy::_duplicate (p);
}

void
Messaging::RelativeRequestTimeoutPolicy_var::tao_release (RelativeRequestTimeoutPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_var::tao_nil (void)
{
  return ::Messaging::RelativeRequestTimeoutPolicy::_nil ();
}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::RelativeRequestTimeoutPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::RelativeRequestTimeoutPolicy_var::tao_upcast (void *src)
{
  RelativeRequestTimeoutPolicy **tmp =
    ACE_static_cast (RelativeRequestTimeoutPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::RelativeRequestTimeoutPolicy_out
// *************************************************************

Messaging::RelativeRequestTimeoutPolicy_out::RelativeRequestTimeoutPolicy_out (RelativeRequestTimeoutPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::RelativeRequestTimeoutPolicy::_nil ();
}

Messaging::RelativeRequestTimeoutPolicy_out::RelativeRequestTimeoutPolicy_out (RelativeRequestTimeoutPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RelativeRequestTimeoutPolicy::_nil ();
}

Messaging::RelativeRequestTimeoutPolicy_out::RelativeRequestTimeoutPolicy_out (const ::Messaging::RelativeRequestTimeoutPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (RelativeRequestTimeoutPolicy_out &, p).ptr_)
{}

::Messaging::RelativeRequestTimeoutPolicy_out &
Messaging::RelativeRequestTimeoutPolicy_out::operator= (const ::Messaging::RelativeRequestTimeoutPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (RelativeRequestTimeoutPolicy_out&, p).ptr_;
  return *this;
}

Messaging::RelativeRequestTimeoutPolicy_out &
Messaging::RelativeRequestTimeoutPolicy_out::operator= (const ::Messaging::RelativeRequestTimeoutPolicy_var &p)
{
  this->ptr_ = ::Messaging::RelativeRequestTimeoutPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::RelativeRequestTimeoutPolicy_out &
Messaging::RelativeRequestTimeoutPolicy_out::operator= (RelativeRequestTimeoutPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::RelativeRequestTimeoutPolicy_out::operator ::Messaging::RelativeRequestTimeoutPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr &
Messaging::RelativeRequestTimeoutPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::RelativeRequestTimeoutPolicy::RelativeRequestTimeoutPolicy ()
{
  }

// destructor
Messaging::RelativeRequestTimeoutPolicy::~RelativeRequestTimeoutPolicy (void)
{}

Messaging::RelativeRequestTimeoutPolicy_ptr Messaging::RelativeRequestTimeoutPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return RelativeRequestTimeoutPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::RelativeRequestTimeoutPolicy_ptr Messaging::RelativeRequestTimeoutPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return RelativeRequestTimeoutPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          RelativeRequestTimeoutPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &RelativeRequestTimeoutPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::RelativeRequestTimeoutPolicy_ptr
Messaging::RelativeRequestTimeoutPolicy::_duplicate (RelativeRequestTimeoutPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::RelativeRequestTimeoutPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, RelativeRequestTimeoutPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_RELATIVE_REQUEST_TIMEOUT_POLICY == 1 */

#if (TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, RELATIVE_RT_TIMEOUT_POLICY_TYPE, 32U)
TAO_NAMESPACE_END

int Messaging::RelativeRoundtripTimeoutPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::RelativeRoundtripTimeoutPolicy_var
// *************************************************************

Messaging::RelativeRoundtripTimeoutPolicy_var::RelativeRoundtripTimeoutPolicy_var (void) // default constructor
  : ptr_ (RelativeRoundtripTimeoutPolicy::_nil ())
{}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::RelativeRoundtripTimeoutPolicy_var::RelativeRoundtripTimeoutPolicy_var (const ::Messaging::RelativeRoundtripTimeoutPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (RelativeRoundtripTimeoutPolicy::_duplicate (p.ptr ()))
{}

Messaging::RelativeRoundtripTimeoutPolicy_var::~RelativeRoundtripTimeoutPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::RelativeRoundtripTimeoutPolicy_var &
Messaging::RelativeRoundtripTimeoutPolicy_var::operator= (RelativeRoundtripTimeoutPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::RelativeRoundtripTimeoutPolicy_var &
Messaging::RelativeRoundtripTimeoutPolicy_var::operator= (const ::Messaging::RelativeRoundtripTimeoutPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::RelativeRoundtripTimeoutPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::RelativeRoundtripTimeoutPolicy_var::operator const ::Messaging::RelativeRoundtripTimeoutPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::RelativeRoundtripTimeoutPolicy_var::operator ::Messaging::RelativeRoundtripTimeoutPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr &
Messaging::RelativeRoundtripTimeoutPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr &
Messaging::RelativeRoundtripTimeoutPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RelativeRoundtripTimeoutPolicy::_nil ();
  return this->ptr_;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::RelativeRoundtripTimeoutPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::RelativeRoundtripTimeoutPolicy::_nil ();
  return val;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_var::tao_duplicate (RelativeRoundtripTimeoutPolicy_ptr p)
{
  return ::Messaging::RelativeRoundtripTimeoutPolicy::_duplicate (p);
}

void
Messaging::RelativeRoundtripTimeoutPolicy_var::tao_release (RelativeRoundtripTimeoutPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_var::tao_nil (void)
{
  return ::Messaging::RelativeRoundtripTimeoutPolicy::_nil ();
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::RelativeRoundtripTimeoutPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::RelativeRoundtripTimeoutPolicy_var::tao_upcast (void *src)
{
  RelativeRoundtripTimeoutPolicy **tmp =
    ACE_static_cast (RelativeRoundtripTimeoutPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::RelativeRoundtripTimeoutPolicy_out
// *************************************************************

Messaging::RelativeRoundtripTimeoutPolicy_out::RelativeRoundtripTimeoutPolicy_out (RelativeRoundtripTimeoutPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::RelativeRoundtripTimeoutPolicy::_nil ();
}

Messaging::RelativeRoundtripTimeoutPolicy_out::RelativeRoundtripTimeoutPolicy_out (RelativeRoundtripTimeoutPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RelativeRoundtripTimeoutPolicy::_nil ();
}

Messaging::RelativeRoundtripTimeoutPolicy_out::RelativeRoundtripTimeoutPolicy_out (const ::Messaging::RelativeRoundtripTimeoutPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (RelativeRoundtripTimeoutPolicy_out &, p).ptr_)
{}

::Messaging::RelativeRoundtripTimeoutPolicy_out &
Messaging::RelativeRoundtripTimeoutPolicy_out::operator= (const ::Messaging::RelativeRoundtripTimeoutPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (RelativeRoundtripTimeoutPolicy_out&, p).ptr_;
  return *this;
}

Messaging::RelativeRoundtripTimeoutPolicy_out &
Messaging::RelativeRoundtripTimeoutPolicy_out::operator= (const ::Messaging::RelativeRoundtripTimeoutPolicy_var &p)
{
  this->ptr_ = ::Messaging::RelativeRoundtripTimeoutPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::RelativeRoundtripTimeoutPolicy_out &
Messaging::RelativeRoundtripTimeoutPolicy_out::operator= (RelativeRoundtripTimeoutPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::RelativeRoundtripTimeoutPolicy_out::operator ::Messaging::RelativeRoundtripTimeoutPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr &
Messaging::RelativeRoundtripTimeoutPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::RelativeRoundtripTimeoutPolicy::RelativeRoundtripTimeoutPolicy ()
{
  }

// destructor
Messaging::RelativeRoundtripTimeoutPolicy::~RelativeRoundtripTimeoutPolicy (void)
{}

Messaging::RelativeRoundtripTimeoutPolicy_ptr Messaging::RelativeRoundtripTimeoutPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return RelativeRoundtripTimeoutPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::RelativeRoundtripTimeoutPolicy_ptr Messaging::RelativeRoundtripTimeoutPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return RelativeRoundtripTimeoutPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          RelativeRoundtripTimeoutPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &RelativeRoundtripTimeoutPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::RelativeRoundtripTimeoutPolicy_ptr
Messaging::RelativeRoundtripTimeoutPolicy::_duplicate (RelativeRoundtripTimeoutPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::RelativeRoundtripTimeoutPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, RelativeRoundtripTimeoutPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1 */

#if (TAO_HAS_ROUTING_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, ROUTING_POLICY_TYPE, 33U)
TAO_NAMESPACE_END
static const CORBA::Long _oc_Messaging_RoutingTypeRange[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  43,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f526f),
  ACE_NTOHL (0x7574696e),
  ACE_NTOHL (0x67547970),
  ACE_NTOHL (0x6552616e),
  ACE_NTOHL (0x67653a31),
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/Messaging/RoutingTypeRange:1.0
  17,
  ACE_NTOHL (0x526f7574),
  ACE_NTOHL (0x696e6754),
  ACE_NTOHL (0x79706552),
  ACE_NTOHL (0x616e6765),
  ACE_NTOHL (0x0),  // name = RoutingTypeRange
  2, // member count
  4,
  ACE_NTOHL (0x6d696e00),  // name = min
  CORBA::tk_alias, // typecode kind for typedefs
  68, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    38,
    ACE_NTOHL (0x49444c3a),
    ACE_NTOHL (0x6f6d672e),
    ACE_NTOHL (0x6f72672f),
    ACE_NTOHL (0x4d657373),
    ACE_NTOHL (0x6167696e),
    ACE_NTOHL (0x672f526f),
    ACE_NTOHL (0x7574696e),
    ACE_NTOHL (0x67547970),
    ACE_NTOHL (0x653a312e),
    ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/Messaging/RoutingType:1.0
    12,
    ACE_NTOHL (0x526f7574),
    ACE_NTOHL (0x696e6754),
    ACE_NTOHL (0x79706500),  // name = RoutingType
    CORBA::tk_short,


  4,
  ACE_NTOHL (0x6d617800),  // name = max
  CORBA::tk_alias, // typecode kind for typedefs
  68, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    38,
    ACE_NTOHL (0x49444c3a),
    ACE_NTOHL (0x6f6d672e),
    ACE_NTOHL (0x6f72672f),
    ACE_NTOHL (0x4d657373),
    ACE_NTOHL (0x6167696e),
    ACE_NTOHL (0x672f526f),
    ACE_NTOHL (0x7574696e),
    ACE_NTOHL (0x67547970),
    ACE_NTOHL (0x653a312e),
    ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/Messaging/RoutingType:1.0
    12,
    ACE_NTOHL (0x526f7574),
    ACE_NTOHL (0x696e6754),
    ACE_NTOHL (0x79706500),  // name = RoutingType
    CORBA::tk_short,


};

static CORBA::TypeCode _tc_TAO_tc_Messaging_RoutingTypeRange (
    CORBA::tk_struct,
    sizeof (_oc_Messaging_RoutingTypeRange),
    (char *) &_oc_Messaging_RoutingTypeRange,
    0,
    sizeof (Messaging::RoutingTypeRange)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_RoutingTypeRange, &_tc_TAO_tc_Messaging_RoutingTypeRange)
TAO_NAMESPACE_END

void Messaging::RoutingTypeRange::_tao_any_destructor (void *x)
{
  RoutingTypeRange *tmp = ACE_static_cast (RoutingTypeRange*,x);
  delete tmp;
}


int Messaging::RoutingPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::RoutingPolicy_var
// *************************************************************

Messaging::RoutingPolicy_var::RoutingPolicy_var (void) // default constructor
  : ptr_ (RoutingPolicy::_nil ())
{}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::RoutingPolicy_var::RoutingPolicy_var (const ::Messaging::RoutingPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (RoutingPolicy::_duplicate (p.ptr ()))
{}

Messaging::RoutingPolicy_var::~RoutingPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::RoutingPolicy_var &
Messaging::RoutingPolicy_var::operator= (RoutingPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::RoutingPolicy_var &
Messaging::RoutingPolicy_var::operator= (const ::Messaging::RoutingPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::RoutingPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::RoutingPolicy_var::operator const ::Messaging::RoutingPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::RoutingPolicy_var::operator ::Messaging::RoutingPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::RoutingPolicy_ptr &
Messaging::RoutingPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::RoutingPolicy_ptr &
Messaging::RoutingPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RoutingPolicy::_nil ();
  return this->ptr_;
}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::RoutingPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::RoutingPolicy::_nil ();
  return val;
}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_var::tao_duplicate (RoutingPolicy_ptr p)
{
  return ::Messaging::RoutingPolicy::_duplicate (p);
}

void
Messaging::RoutingPolicy_var::tao_release (RoutingPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_var::tao_nil (void)
{
  return ::Messaging::RoutingPolicy::_nil ();
}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::RoutingPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::RoutingPolicy_var::tao_upcast (void *src)
{
  RoutingPolicy **tmp =
    ACE_static_cast (RoutingPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::RoutingPolicy_out
// *************************************************************

Messaging::RoutingPolicy_out::RoutingPolicy_out (RoutingPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::RoutingPolicy::_nil ();
}

Messaging::RoutingPolicy_out::RoutingPolicy_out (RoutingPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::RoutingPolicy::_nil ();
}

Messaging::RoutingPolicy_out::RoutingPolicy_out (const ::Messaging::RoutingPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (RoutingPolicy_out &, p).ptr_)
{}

::Messaging::RoutingPolicy_out &
Messaging::RoutingPolicy_out::operator= (const ::Messaging::RoutingPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (RoutingPolicy_out&, p).ptr_;
  return *this;
}

Messaging::RoutingPolicy_out &
Messaging::RoutingPolicy_out::operator= (const ::Messaging::RoutingPolicy_var &p)
{
  this->ptr_ = ::Messaging::RoutingPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::RoutingPolicy_out &
Messaging::RoutingPolicy_out::operator= (RoutingPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::RoutingPolicy_out::operator ::Messaging::RoutingPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::RoutingPolicy_ptr &
Messaging::RoutingPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::RoutingPolicy::RoutingPolicy ()
{
  }

// destructor
Messaging::RoutingPolicy::~RoutingPolicy (void)
{}

Messaging::RoutingPolicy_ptr Messaging::RoutingPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return RoutingPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::RoutingPolicy_ptr Messaging::RoutingPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return RoutingPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          RoutingPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &RoutingPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::RoutingPolicy_ptr
Messaging::RoutingPolicy::_duplicate (RoutingPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::RoutingPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, RoutingPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_ROUTING_POLICY == 1 */

#if (TAO_HAS_MAX_HOPS_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, MAX_HOPS_POLICY_TYPE, 34U)
TAO_NAMESPACE_END

int Messaging::MaxHopsPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::MaxHopsPolicy_var
// *************************************************************

Messaging::MaxHopsPolicy_var::MaxHopsPolicy_var (void) // default constructor
  : ptr_ (MaxHopsPolicy::_nil ())
{}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::MaxHopsPolicy_var::MaxHopsPolicy_var (const ::Messaging::MaxHopsPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (MaxHopsPolicy::_duplicate (p.ptr ()))
{}

Messaging::MaxHopsPolicy_var::~MaxHopsPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::MaxHopsPolicy_var &
Messaging::MaxHopsPolicy_var::operator= (MaxHopsPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::MaxHopsPolicy_var &
Messaging::MaxHopsPolicy_var::operator= (const ::Messaging::MaxHopsPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::MaxHopsPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::MaxHopsPolicy_var::operator const ::Messaging::MaxHopsPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::MaxHopsPolicy_var::operator ::Messaging::MaxHopsPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::MaxHopsPolicy_ptr &
Messaging::MaxHopsPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::MaxHopsPolicy_ptr &
Messaging::MaxHopsPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::MaxHopsPolicy::_nil ();
  return this->ptr_;
}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::MaxHopsPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::MaxHopsPolicy::_nil ();
  return val;
}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_var::tao_duplicate (MaxHopsPolicy_ptr p)
{
  return ::Messaging::MaxHopsPolicy::_duplicate (p);
}

void
Messaging::MaxHopsPolicy_var::tao_release (MaxHopsPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_var::tao_nil (void)
{
  return ::Messaging::MaxHopsPolicy::_nil ();
}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::MaxHopsPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::MaxHopsPolicy_var::tao_upcast (void *src)
{
  MaxHopsPolicy **tmp =
    ACE_static_cast (MaxHopsPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::MaxHopsPolicy_out
// *************************************************************

Messaging::MaxHopsPolicy_out::MaxHopsPolicy_out (MaxHopsPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::MaxHopsPolicy::_nil ();
}

Messaging::MaxHopsPolicy_out::MaxHopsPolicy_out (MaxHopsPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::MaxHopsPolicy::_nil ();
}

Messaging::MaxHopsPolicy_out::MaxHopsPolicy_out (const ::Messaging::MaxHopsPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (MaxHopsPolicy_out &, p).ptr_)
{}

::Messaging::MaxHopsPolicy_out &
Messaging::MaxHopsPolicy_out::operator= (const ::Messaging::MaxHopsPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (MaxHopsPolicy_out&, p).ptr_;
  return *this;
}

Messaging::MaxHopsPolicy_out &
Messaging::MaxHopsPolicy_out::operator= (const ::Messaging::MaxHopsPolicy_var &p)
{
  this->ptr_ = ::Messaging::MaxHopsPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::MaxHopsPolicy_out &
Messaging::MaxHopsPolicy_out::operator= (MaxHopsPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::MaxHopsPolicy_out::operator ::Messaging::MaxHopsPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::MaxHopsPolicy_ptr &
Messaging::MaxHopsPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::MaxHopsPolicy::MaxHopsPolicy ()
{
  }

// destructor
Messaging::MaxHopsPolicy::~MaxHopsPolicy (void)
{}

Messaging::MaxHopsPolicy_ptr Messaging::MaxHopsPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return MaxHopsPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::MaxHopsPolicy_ptr Messaging::MaxHopsPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return MaxHopsPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          MaxHopsPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &MaxHopsPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::MaxHopsPolicy_ptr
Messaging::MaxHopsPolicy::_duplicate (MaxHopsPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::MaxHopsPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, MaxHopsPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_MAX_HOPS_POLICY == 1 */

#if (TAO_HAS_QUEUE_ORDER_POLICY == 1)

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, QUEUE_ORDER_POLICY_TYPE, 35U)
TAO_NAMESPACE_END

int Messaging::QueueOrderPolicy::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::QueueOrderPolicy_var
// *************************************************************

Messaging::QueueOrderPolicy_var::QueueOrderPolicy_var (void) // default constructor
  : ptr_ (QueueOrderPolicy::_nil ())
{}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::QueueOrderPolicy_var::QueueOrderPolicy_var (const ::Messaging::QueueOrderPolicy_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (QueueOrderPolicy::_duplicate (p.ptr ()))
{}

Messaging::QueueOrderPolicy_var::~QueueOrderPolicy_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::QueueOrderPolicy_var &
Messaging::QueueOrderPolicy_var::operator= (QueueOrderPolicy_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::QueueOrderPolicy_var &
Messaging::QueueOrderPolicy_var::operator= (const ::Messaging::QueueOrderPolicy_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::QueueOrderPolicy::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::QueueOrderPolicy_var::operator const ::Messaging::QueueOrderPolicy_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::QueueOrderPolicy_var::operator ::Messaging::QueueOrderPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_var::in (void) const
{
  return this->ptr_;
}

::Messaging::QueueOrderPolicy_ptr &
Messaging::QueueOrderPolicy_var::inout (void)
{
  return this->ptr_;
}

::Messaging::QueueOrderPolicy_ptr &
Messaging::QueueOrderPolicy_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::QueueOrderPolicy::_nil ();
  return this->ptr_;
}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::QueueOrderPolicy_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::QueueOrderPolicy::_nil ();
  return val;
}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_var::tao_duplicate (QueueOrderPolicy_ptr p)
{
  return ::Messaging::QueueOrderPolicy::_duplicate (p);
}

void
Messaging::QueueOrderPolicy_var::tao_release (QueueOrderPolicy_ptr p)
{
  CORBA::release (p);
}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_var::tao_nil (void)
{
  return ::Messaging::QueueOrderPolicy::_nil ();
}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::QueueOrderPolicy::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::QueueOrderPolicy_var::tao_upcast (void *src)
{
  QueueOrderPolicy **tmp =
    ACE_static_cast (QueueOrderPolicy **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::QueueOrderPolicy_out
// *************************************************************

Messaging::QueueOrderPolicy_out::QueueOrderPolicy_out (QueueOrderPolicy_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::QueueOrderPolicy::_nil ();
}

Messaging::QueueOrderPolicy_out::QueueOrderPolicy_out (QueueOrderPolicy_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::QueueOrderPolicy::_nil ();
}

Messaging::QueueOrderPolicy_out::QueueOrderPolicy_out (const ::Messaging::QueueOrderPolicy_out &p) // copy constructor
  : ptr_ (ACE_const_cast (QueueOrderPolicy_out &, p).ptr_)
{}

::Messaging::QueueOrderPolicy_out &
Messaging::QueueOrderPolicy_out::operator= (const ::Messaging::QueueOrderPolicy_out &p)
{
  this->ptr_ = ACE_const_cast (QueueOrderPolicy_out&, p).ptr_;
  return *this;
}

Messaging::QueueOrderPolicy_out &
Messaging::QueueOrderPolicy_out::operator= (const ::Messaging::QueueOrderPolicy_var &p)
{
  this->ptr_ = ::Messaging::QueueOrderPolicy::_duplicate (p.ptr ());
  return *this;
}

Messaging::QueueOrderPolicy_out &
Messaging::QueueOrderPolicy_out::operator= (QueueOrderPolicy_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::QueueOrderPolicy_out::operator ::Messaging::QueueOrderPolicy_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::QueueOrderPolicy_ptr &
Messaging::QueueOrderPolicy_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy_out::operator-> (void)
{
  return this->ptr_;
}


// default constructor
Messaging::QueueOrderPolicy::QueueOrderPolicy ()
{
  }

// destructor
Messaging::QueueOrderPolicy::~QueueOrderPolicy (void)
{}

Messaging::QueueOrderPolicy_ptr Messaging::QueueOrderPolicy::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  return QueueOrderPolicy::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::QueueOrderPolicy_ptr Messaging::QueueOrderPolicy::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return QueueOrderPolicy::_nil ();

  return
      ACE_reinterpret_cast
        (
          QueueOrderPolicy_ptr,
            obj->_tao_QueryInterface
              (
                ACE_reinterpret_cast
                  (
                    ptr_arith_t,
                    &QueueOrderPolicy::_tao_class_id
                  )
              )
        );
}

Messaging::QueueOrderPolicy_ptr
Messaging::QueueOrderPolicy::_duplicate (QueueOrderPolicy_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

void *Messaging::QueueOrderPolicy::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, QueueOrderPolicy)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &::CORBA::Policy::_tao_class_id))
    retv = ACE_reinterpret_cast
      (
        void *,
        ACE_static_cast
          (
            CORBA::Policy_ptr,
            this
          )
      );
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

#endif /* TAO_HAS_QUEUE_ORDER_POLICY == 1 */

static const CORBA::Long _oc_Messaging_PolicyValue[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  38,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f506f),
  ACE_NTOHL (0x6c696379),
  ACE_NTOHL (0x56616c75),
  ACE_NTOHL (0x653a312e),
  ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/Messaging/PolicyValue:1.0
  12,
  ACE_NTOHL (0x506f6c69),
  ACE_NTOHL (0x63795661),
  ACE_NTOHL (0x6c756500),  // name = PolicyValue
  2, // member count
  6,
  ACE_NTOHL (0x70747970),
  ACE_NTOHL (0x65000000),  // name = ptype
  CORBA::tk_alias, // typecode kind for typedefs
  64, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    33,
    ACE_NTOHL (0x49444c3a),
    ACE_NTOHL (0x6f6d672e),
    ACE_NTOHL (0x6f72672f),
    ACE_NTOHL (0x434f5242),
    ACE_NTOHL (0x412f506f),
    ACE_NTOHL (0x6c696379),
    ACE_NTOHL (0x54797065),
    ACE_NTOHL (0x3a312e30),
    ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CORBA/PolicyType:1.0
    11,
    ACE_NTOHL (0x506f6c69),
    ACE_NTOHL (0x63795479),
    ACE_NTOHL (0x70650000),  // name = PolicyType
    CORBA::tk_ulong,


  7,
  ACE_NTOHL (0x7076616c),
  ACE_NTOHL (0x75650000),  // name = pvalue
  CORBA::tk_sequence, // typecode kind
  12, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    CORBA::tk_octet,

    0U,

};

static CORBA::TypeCode _tc_TAO_tc_Messaging_PolicyValue (
    CORBA::tk_struct,
    sizeof (_oc_Messaging_PolicyValue),
    (char *) &_oc_Messaging_PolicyValue,
    0,
    sizeof (Messaging::PolicyValue)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PolicyValue, &_tc_TAO_tc_Messaging_PolicyValue)
TAO_NAMESPACE_END

void Messaging::PolicyValue::_tao_any_destructor (void *x)
{
  PolicyValue *tmp = ACE_static_cast (PolicyValue*,x);
  delete tmp;
}


#if !defined (_MESSAGING_POLICYVALUE__TAO_SEQ_OCTET_CS_)
#define _MESSAGING_POLICYVALUE__TAO_SEQ_OCTET_CS_

// *************************************************************
// Messaging::PolicyValue::_tao_seq_Octet
// *************************************************************

Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (void)
{}
Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max) // uses max size
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  TAO_Unbounded_Sequence<CORBA::Octet>
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::Octet>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max)
{}
Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release)
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  TAO_Unbounded_Sequence<CORBA::Octet>
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::Octet>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max, length, buffer, release)
{}
Messaging::PolicyValue::_tao_seq_Octet::_tao_seq_Octet (const _tao_seq_Octet &seq) // copy ctor
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  TAO_Unbounded_Sequence<CORBA::Octet>
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::Octet>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (seq)
{}
Messaging::PolicyValue::_tao_seq_Octet::~_tao_seq_Octet (void) // dtor
{}
void Messaging::PolicyValue::_tao_seq_Octet::_tao_any_destructor (void *x)
{
  _tao_seq_Octet *tmp = ACE_static_cast (_tao_seq_Octet*,x);
  delete tmp;
}


#endif /* end #if !defined */


#if !defined (TAO_USE_SEQUENCE_TEMPLATES)

#if !defined (__TAO_UNBOUNDED_SEQUENCE_MESSAGING_POLICYVALUESEQ_CS_)
#define __TAO_UNBOUNDED_SEQUENCE_MESSAGING_POLICYVALUESEQ_CS_

  void
  Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::_allocate_buffer (CORBA::ULong length)
  {
    Messaging::PolicyValue* tmp = 0;
    tmp = _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::allocbuf (length);

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

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

      if (this->release_)
        _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::freebuf (old);

    }
    this->buffer_ = tmp;
  }

  void
  Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::_deallocate_buffer (void)
  {
    if (this->buffer_ == 0 || this->release_ == 0)
      return;

    Messaging::PolicyValue *tmp = ACE_reinterpret_cast (Messaging::PolicyValue *,this->buffer_);

    _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::freebuf (tmp);
    this->buffer_ = 0;
  }

  Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::~_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq (void) // Dtor.
  {
    this->_deallocate_buffer ();
  }


#endif /* end #if !defined */


#endif /* !TAO_USE_SEQUENCE_TEMPLATES */

#if !defined (_MESSAGING_POLICYVALUESEQ_CS_)
#define _MESSAGING_POLICYVALUESEQ_CS_

// *************************************************************
// Messaging::PolicyValueSeq
// *************************************************************

Messaging::PolicyValueSeq::PolicyValueSeq (void)
{}
Messaging::PolicyValueSeq::PolicyValueSeq (CORBA::ULong max) // uses max size
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<Messaging::PolicyValue>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max)
{}
Messaging::PolicyValueSeq::PolicyValueSeq (CORBA::ULong max, CORBA::ULong length, Messaging::PolicyValue *buffer, CORBA::Boolean release)
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<Messaging::PolicyValue>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max, length, buffer, release)
{}
Messaging::PolicyValueSeq::PolicyValueSeq (const PolicyValueSeq &seq) // copy ctor
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  _TAO_Unbounded_Sequence_Messaging_PolicyValueSeq
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<Messaging::PolicyValue>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (seq)
{}
Messaging::PolicyValueSeq::~PolicyValueSeq (void) // dtor
{}
void Messaging::PolicyValueSeq::_tao_any_destructor (void *x)
{
  PolicyValueSeq *tmp = ACE_static_cast (PolicyValueSeq*,x);
  delete tmp;
}


#endif /* end #if !defined */

static const CORBA::Long _oc_Messaging_PolicyValueSeq[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  41,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f506f),
  ACE_NTOHL (0x6c696379),
  ACE_NTOHL (0x56616c75),
  ACE_NTOHL (0x65536571),
  ACE_NTOHL (0x3a312e30),
  ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/Messaging/PolicyValueSeq:1.0
  15,
  ACE_NTOHL (0x506f6c69),
  ACE_NTOHL (0x63795661),
  ACE_NTOHL (0x6c756553),
  ACE_NTOHL (0x65710000),  // name = PolicyValueSeq
  CORBA::tk_sequence, // typecode kind
  200, // encapsulation length
    TAO_ENCAP_BYTE_ORDER, // byte order
    CORBA::tk_struct, // typecode kind
    184, // encapsulation length
      TAO_ENCAP_BYTE_ORDER, // byte order
      38,
      ACE_NTOHL (0x49444c3a),
      ACE_NTOHL (0x6f6d672e),
      ACE_NTOHL (0x6f72672f),
      ACE_NTOHL (0x4d657373),
      ACE_NTOHL (0x6167696e),
      ACE_NTOHL (0x672f506f),
      ACE_NTOHL (0x6c696379),
      ACE_NTOHL (0x56616c75),
      ACE_NTOHL (0x653a312e),
      ACE_NTOHL (0x30000000),  // repository ID = IDL:omg.org/Messaging/PolicyValue:1.0
      12,
      ACE_NTOHL (0x506f6c69),
      ACE_NTOHL (0x63795661),
      ACE_NTOHL (0x6c756500),  // name = PolicyValue
      2, // member count
      6,
      ACE_NTOHL (0x70747970),
      ACE_NTOHL (0x65000000),  // name = ptype
      CORBA::tk_alias, // typecode kind for typedefs
      64, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        33,
        ACE_NTOHL (0x49444c3a),
        ACE_NTOHL (0x6f6d672e),
        ACE_NTOHL (0x6f72672f),
        ACE_NTOHL (0x434f5242),
        ACE_NTOHL (0x412f506f),
        ACE_NTOHL (0x6c696379),
        ACE_NTOHL (0x54797065),
        ACE_NTOHL (0x3a312e30),
        ACE_NTOHL (0x0),  // repository ID = IDL:omg.org/CORBA/PolicyType:1.0
        11,
        ACE_NTOHL (0x506f6c69),
        ACE_NTOHL (0x63795479),
        ACE_NTOHL (0x70650000),  // name = PolicyType
        CORBA::tk_ulong,


      7,
      ACE_NTOHL (0x7076616c),
      ACE_NTOHL (0x75650000),  // name = pvalue
      CORBA::tk_sequence, // typecode kind
      12, // encapsulation length
        TAO_ENCAP_BYTE_ORDER, // byte order
        CORBA::tk_octet,

        0U,


    0U,

};

static CORBA::TypeCode _tc_TAO_tc_Messaging_PolicyValueSeq (
    CORBA::tk_alias,
    sizeof (_oc_Messaging_PolicyValueSeq),
    (char *) &_oc_Messaging_PolicyValueSeq,
    0,
    sizeof (Messaging::PolicyValueSeq)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_PolicyValueSeq, &_tc_TAO_tc_Messaging_PolicyValueSeq)
TAO_NAMESPACE_END

TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, TAG_POLICIES, 2U)
TAO_NAMESPACE_END
TAO_NAMESPACE_TYPE (const CORBA::ULong)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (const CORBA::ULong, INVOCATION_POLICIES, 2U)
TAO_NAMESPACE_END

#if (TAO_HAS_AMI_CALLBACK == 1) || (TAO_HAS_AMI_POLLER == 1)

Messaging::ExceptionHolder* Messaging::ExceptionHolder::_downcast (CORBA::ValueBase* v)
{
  if (v == 0) return 0;
  return (ExceptionHolder* ) v->_tao_obv_narrow ((ptr_arith_t) &_downcast);
}

const char* Messaging::ExceptionHolder::_tao_obv_repository_id () const
{
  return this->_tao_obv_static_repository_id ();
}

void* Messaging::ExceptionHolder::_tao_obv_narrow (ptr_arith_t type_id)
{
  if (type_id == (ptr_arith_t) &_downcast)
    return this;
  void *rval = 0;
  return rval;
}

CORBA::Boolean Messaging::ExceptionHolder::_tao_marshal_v (TAO_OutputCDR & strm)
{
  return this->_tao_marshal__Messaging_ExceptionHolder (strm);
}

CORBA::Boolean Messaging::ExceptionHolder::_tao_unmarshal_v (TAO_InputCDR & strm)
{
  return this->_tao_unmarshal__Messaging_ExceptionHolder (strm);
}

CORBA::Boolean Messaging::ExceptionHolder::_tao_unmarshal (TAO_InputCDR &strm, ExceptionHolder *&new_object)
{
  CORBA::Boolean retval = 1;
  CORBA::ValueBase *base;   // %! should be a _var
  CORBA::ValueFactory_ptr factory;   // %! should be a _var
  if (!CORBA::ValueBase::_tao_unmarshal_pre (strm, factory, base,
          ExceptionHolder::_tao_obv_static_repository_id ()) )
    {
      return 0;
    }
  if (factory != 0)
    {
      base = factory->create_for_unmarshal ();
      factory->_remove_ref ();
      if (base == 0)  return 0;  // %! except.?
      //%! ACE_DEBUG ((LM_DEBUG, "Messaging::ExceptionHolder::_tao_unmarshal %s\n", base->_tao_obv_repository_id () ));
      retval = base->_tao_unmarshal_v (strm);
      //%! ACE_DEBUG ((LM_DEBUG, "Messaging::ExceptionHolder::_tao_unmarshal retval unmarshal_v is %d\n", retval));
      if (!retval) return 0;
    }
  // Now base must be null or point to the unmarshaled object.
  // Align the pointer to the right subobject.
  new_object = ExceptionHolder::_downcast (base);
  // %! unmarshal_post
  return 1;
}


#if !defined (_MESSAGING_EXCEPTIONHOLDER___INIT_CS_)
#define _MESSAGING_EXCEPTIONHOLDER___INIT_CS_

Messaging::ExceptionHolder_init::~ExceptionHolder_init (void)
{
}

const char*
Messaging::ExceptionHolder_init::tao_repository_id (void)
{
  return ExceptionHolder::_tao_obv_static_repository_id ();
}


#endif /* end #if !defined */


int Messaging::ReplyHandler::_tao_class_id = 0;

// *************************************************************
// Operations for class Messaging::ReplyHandler_var
// *************************************************************

Messaging::ReplyHandler_var::ReplyHandler_var (void) // default constructor
  : ptr_ (ReplyHandler::_nil ())
{}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_var::ptr (void) const
{
  return this->ptr_;
}

Messaging::ReplyHandler_var::ReplyHandler_var (const ::Messaging::ReplyHandler_var &p) // copy constructor
  : TAO_Base_var (),
    ptr_ (ReplyHandler::_duplicate (p.ptr ()))
{}

Messaging::ReplyHandler_var::~ReplyHandler_var (void) // destructor
{
  CORBA::release (this->ptr_);
}

Messaging::ReplyHandler_var &
Messaging::ReplyHandler_var::operator= (ReplyHandler_ptr p)
{
  CORBA::release (this->ptr_);
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyHandler_var &
Messaging::ReplyHandler_var::operator= (const ::Messaging::ReplyHandler_var &p)
{
  if (this != &p)
  {
    CORBA::release (this->ptr_);
    this->ptr_ = ::Messaging::ReplyHandler::_duplicate (p.ptr ());
  }
  return *this;
}

Messaging::ReplyHandler_var::operator const ::Messaging::ReplyHandler_ptr &() const // cast
{
  return this->ptr_;
}

Messaging::ReplyHandler_var::operator ::Messaging::ReplyHandler_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_var::operator-> (void) const
{
  return this->ptr_;
}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_var::in (void) const
{
  return this->ptr_;
}

::Messaging::ReplyHandler_ptr &
Messaging::ReplyHandler_var::inout (void)
{
  return this->ptr_;
}

::Messaging::ReplyHandler_ptr &
Messaging::ReplyHandler_var::out (void)
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyHandler::_nil ();
  return this->ptr_;
}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_var::_retn (void)
{
  // yield ownership of managed obj reference
  ::Messaging::ReplyHandler_ptr val = this->ptr_;
  this->ptr_ = ::Messaging::ReplyHandler::_nil ();
  return val;
}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_var::tao_duplicate (ReplyHandler_ptr p)
{
  return ::Messaging::ReplyHandler::_duplicate (p);
}

void
Messaging::ReplyHandler_var::tao_release (ReplyHandler_ptr p)
{
  CORBA::release (p);
}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_var::tao_nil (void)
{
  return ::Messaging::ReplyHandler::_nil ();
}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_var::tao_narrow (
    CORBA::Object *p
    ACE_ENV_ARG_DECL
  )
{
  return ::Messaging::ReplyHandler::_narrow (p ACE_ENV_ARG_PARAMETER);
}

CORBA::Object *
Messaging::ReplyHandler_var::tao_upcast (void *src)
{
  ReplyHandler **tmp =
    ACE_static_cast (ReplyHandler **, src);
  return *tmp;
}
// *************************************************************
// Operations for class Messaging::ReplyHandler_out
// *************************************************************

Messaging::ReplyHandler_out::ReplyHandler_out (ReplyHandler_ptr &p)
  : ptr_ (p)
{
  this->ptr_ = ::Messaging::ReplyHandler::_nil ();
}

Messaging::ReplyHandler_out::ReplyHandler_out (ReplyHandler_var &p) // constructor from _var
  : ptr_ (p.out ())
{
  CORBA::release (this->ptr_);
  this->ptr_ = ::Messaging::ReplyHandler::_nil ();
}

Messaging::ReplyHandler_out::ReplyHandler_out (const ::Messaging::ReplyHandler_out &p) // copy constructor
  : ptr_ (ACE_const_cast (ReplyHandler_out &, p).ptr_)
{}

::Messaging::ReplyHandler_out &
Messaging::ReplyHandler_out::operator= (const ::Messaging::ReplyHandler_out &p)
{
  this->ptr_ = ACE_const_cast (ReplyHandler_out&, p).ptr_;
  return *this;
}

Messaging::ReplyHandler_out &
Messaging::ReplyHandler_out::operator= (const ::Messaging::ReplyHandler_var &p)
{
  this->ptr_ = ::Messaging::ReplyHandler::_duplicate (p.ptr ());
  return *this;
}

Messaging::ReplyHandler_out &
Messaging::ReplyHandler_out::operator= (ReplyHandler_ptr p)
{
  this->ptr_ = p;
  return *this;
}

Messaging::ReplyHandler_out::operator ::Messaging::ReplyHandler_ptr &() // cast
{
  return this->ptr_;
}

::Messaging::ReplyHandler_ptr &
Messaging::ReplyHandler_out::ptr (void) // ptr
{
  return this->ptr_;
}

::Messaging::ReplyHandler_ptr
Messaging::ReplyHandler_out::operator-> (void)
{
  return this->ptr_;
}


#if (TAO_HAS_INTERCEPTORS == 1)
#endif /* TAO_HAS_INTERCEPTORS */

///////////////////////////////////////////////////////////////////////
//                Base & Remote Proxy  Implementation.
//

Messaging::_TAO_ReplyHandler_Proxy_Impl::_TAO_ReplyHandler_Proxy_Impl (void)
{}

Messaging::_TAO_ReplyHandler_Remote_Proxy_Impl::_TAO_ReplyHandler_Remote_Proxy_Impl (void)
{}

// Remote Implementation of the IDL interface methods


//
//            End  Base & Remote  Proxy Implemeentation.
///////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////
//           Remote & Base  Proxy Broker Implementation
//

Messaging::_TAO_ReplyHandler_Proxy_Broker::_TAO_ReplyHandler_Proxy_Broker (void)
{
}

Messaging::_TAO_ReplyHandler_Proxy_Broker::~_TAO_ReplyHandler_Proxy_Broker (void)
{
}

Messaging::_TAO_ReplyHandler_Proxy_Broker * (*Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function_pointer) (
    CORBA::Object_ptr obj
  ) = 0;

// Factory Member function Implementation.
Messaging::_TAO_ReplyHandler_Remote_Proxy_Broker *
Messaging::_TAO_ReplyHandler_Remote_Proxy_Broker::the_TAO_ReplyHandler_Remote_Proxy_Broker (void)
{
  static ::Messaging::_TAO_ReplyHandler_Remote_Proxy_Broker remote_proxy_broker;
  return &remote_proxy_broker;
}

Messaging::_TAO_ReplyHandler_Remote_Proxy_Broker::_TAO_ReplyHandler_Remote_Proxy_Broker (void)
{
}

Messaging::_TAO_ReplyHandler_Remote_Proxy_Broker::~_TAO_ReplyHandler_Remote_Proxy_Broker (void)
{
}

Messaging::_TAO_ReplyHandler_Proxy_Impl&
Messaging::_TAO_ReplyHandler_Remote_Proxy_Broker::select_proxy (
  ::Messaging::ReplyHandler *
  ACE_ENV_ARG_DECL_NOT_USED
)
{
  return this->remote_proxy_impl_;
}


//
//           End Remote & Base Proxy Broker Implementation
///////////////////////////////////////////////////////////////////////


// default constructor
Messaging::ReplyHandler::ReplyHandler (int collocated)
{
  this->Messaging_ReplyHandler_setup_collocation (collocated);
}

// destructor
Messaging::ReplyHandler::~ReplyHandler (void)
{}

void
Messaging::ReplyHandler::Messaging_ReplyHandler_setup_collocation (int collocated)
{
  if (collocated)
    this->the_TAO_ReplyHandler_Proxy_Broker_ =
      ::Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function_pointer (this);
  else
    this->the_TAO_ReplyHandler_Proxy_Broker_ =
      ::Messaging::_TAO_ReplyHandler_Remote_Proxy_Broker::the_TAO_ReplyHandler_Remote_Proxy_Broker ();
}

void Messaging::ReplyHandler::_tao_any_destructor (void *x)
{
  ReplyHandler *tmp = ACE_static_cast (ReplyHandler*,x);
  CORBA::release (tmp);
}

Messaging::ReplyHandler_ptr Messaging::ReplyHandler::_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL
  )
{
  if (CORBA::is_nil (obj))
    return ReplyHandler::_nil ();
  if (! obj->_is_local ())
    {
      CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/Messaging/ReplyHandler:1.0" ACE_ENV_ARG_PARAMETER);
      ACE_CHECK_RETURN (ReplyHandler::_nil ());
      if (is_a == 0)
        return ReplyHandler::_nil ();
    }
  return ReplyHandler::_unchecked_narrow (obj ACE_ENV_ARG_PARAMETER);
}

Messaging::ReplyHandler_ptr Messaging::ReplyHandler::_unchecked_narrow (
    CORBA::Object_ptr obj
    ACE_ENV_ARG_DECL_NOT_USED
  )
{
  if (CORBA::is_nil (obj))
    return ReplyHandler::_nil ();

  if (! obj->_is_local ())
    {
      TAO_Stub* stub = obj->_stubobj ();
      if (stub)
        stub->_incr_refcnt ();

      ReplyHandler_ptr default_proxy = ReplyHandler::_nil ();

      if (
          !CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&
          stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&
          obj->_is_collocated () &&Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function_pointer != 0
        )
      {
        ACE_NEW_RETURN (
          default_proxy,
          ::Messaging::ReplyHandler (
            stub,
            1,
            obj->_servant ()),

          ReplyHandler::_nil ());
        }
      if (CORBA::is_nil (default_proxy))
        ACE_NEW_RETURN (default_proxy, ::Messaging::ReplyHandler (stub, 0, obj->_servant ()), ReplyHandler::_nil ());
        return default_proxy;
      }
    else
      return
        ACE_reinterpret_cast
          (
            ReplyHandler_ptr,
              obj->_tao_QueryInterface
                (
                  ACE_reinterpret_cast
                    (
                      ptr_arith_t,
                      &ReplyHandler::_tao_class_id
                    )
                )
          );
}

Messaging::ReplyHandler_ptr
Messaging::ReplyHandler::_duplicate (ReplyHandler_ptr obj)
{
  if (!CORBA::is_nil (obj))
    obj->_add_ref ();
  return obj;
}

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

void *Messaging::ReplyHandler::_tao_QueryInterface (ptr_arith_t type)
{
  void *retv = 0;
  if (type == ACE_reinterpret_cast
    (ptr_arith_t,
      &ACE_NESTED_CLASS (::Messaging, ReplyHandler)::_tao_class_id))
    retv = ACE_reinterpret_cast (void*, this);
  else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id))
    retv = ACE_reinterpret_cast (void *,
      ACE_static_cast (CORBA::Object_ptr, this));

  if (retv)
    this->_add_ref ();
  return retv;
}

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

static const CORBA::Long _oc_Messaging_ReplyHandler[] =
{
  TAO_ENCAP_BYTE_ORDER, // byte order
  39,
  ACE_NTOHL (0x49444c3a),
  ACE_NTOHL (0x6f6d672e),
  ACE_NTOHL (0x6f72672f),
  ACE_NTOHL (0x4d657373),
  ACE_NTOHL (0x6167696e),
  ACE_NTOHL (0x672f5265),
  ACE_NTOHL (0x706c7948),
  ACE_NTOHL (0x616e646c),
  ACE_NTOHL (0x65723a31),
  ACE_NTOHL (0x2e300000),  // repository ID = IDL:omg.org/Messaging/ReplyHandler:1.0
  13,
  ACE_NTOHL (0x5265706c),
  ACE_NTOHL (0x7948616e),
  ACE_NTOHL (0x646c6572),
  ACE_NTOHL (0x0),  // name = ReplyHandler
};

static CORBA::TypeCode _tc_TAO_tc_Messaging_ReplyHandler (
    CORBA::tk_objref,
    sizeof (_oc_Messaging_ReplyHandler),
    (char *) &_oc_Messaging_ReplyHandler,
    0,
    sizeof (Messaging::ReplyHandler)
  );

TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr)
TAO_NAMESPACE_BEGIN (Messaging)
TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_ReplyHandler, &_tc_TAO_tc_Messaging_ReplyHandler)
TAO_NAMESPACE_END


#endif /* TAO_HAS_AMI_CALLBACK == 1 || TAO_HAS_AMI_POLLER == 1 */

#if (TAO_HAS_AMI_CALLBACK == 1)

CORBA::Boolean
OBV_Messaging::ExceptionHolder::_tao_marshal__Messaging_ExceptionHolder (TAO_OutputCDR &strm){
  return _tao_marshal_state (strm);

}
CORBA::Boolean OBV_Messaging::ExceptionHolder::_tao_unmarshal__Messaging_ExceptionHolder (TAO_InputCDR &strm){
  return _tao_unmarshal_state (strm);

}
// accessor to set the member
void
OBV_Messaging::ExceptionHolder::is_system_exception (CORBA::Boolean val) // set
{
  // set the value
  this->_pd_is_system_exception = val;
}
// retrieve the member
CORBA::Boolean
OBV_Messaging::ExceptionHolder::is_system_exception (void) const
{
  return this->_pd_is_system_exception;
}

// accessor to set the member
void
OBV_Messaging::ExceptionHolder::byte_order (CORBA::Boolean val) // set
{
  // set the value
  this->_pd_byte_order = val;
}
// retrieve the member
CORBA::Boolean
OBV_Messaging::ExceptionHolder::byte_order (void) const
{
  return this->_pd_byte_order;
}


#if !defined (_MESSAGING_EXCEPTIONHOLDER__TAO_SEQ_OCTET_CS_)
#define _MESSAGING_EXCEPTIONHOLDER__TAO_SEQ_OCTET_CS_

// *************************************************************
// Messaging::ExceptionHolder::_tao_seq_Octet
// *************************************************************

Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (void)
{}
Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max) // uses max size
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  TAO_Unbounded_Sequence<CORBA::Octet>
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::Octet>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max)
{}
Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release)
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  TAO_Unbounded_Sequence<CORBA::Octet>
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::Octet>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (max, length, buffer, release)
{}
Messaging::ExceptionHolder::_tao_seq_Octet::_tao_seq_Octet (const _tao_seq_Octet &seq) // copy ctor
  :
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
  TAO_Unbounded_Sequence<CORBA::Octet>
#else /* TAO_USE_SEQUENCE_TEMPLATES */
  TAO_Unbounded_Sequence<CORBA::Octet>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
 (seq)
{}
Messaging::ExceptionHolder::_tao_seq_Octet::~_tao_seq_Octet (void) // dtor
{}
void Messaging::ExceptionHolder::_tao_seq_Octet::_tao_any_destructor (void *x)
{
  _tao_seq_Octet *tmp = ACE_static_cast (_tao_seq_Octet*,x);
  delete tmp;
}


#endif /* end #if !defined */

// accessor to set the member
void
OBV_Messaging::ExceptionHolder::marshaled_exception (const Messaging::ExceptionHolder::_tao_seq_Octet &val)
{
  this->_pd_marshaled_exception = val;
}

// readonly get method
const Messaging::ExceptionHolder::_tao_seq_Octet &
OBV_Messaging::ExceptionHolder::marshaled_exception (void) const
{
  return this->_pd_marshaled_exception;
}

// read/write get method
Messaging::ExceptionHolder::_tao_seq_Octet &
OBV_Messaging::ExceptionHolder::marshaled_exception (void)
{
  return this->_pd_marshaled_exception;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::RebindPolicy,Messaging::RebindPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::RebindPolicy,Messaging::RebindPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::SyncScopePolicy,Messaging::SyncScopePolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::SyncScopePolicy,Messaging::SyncScopePolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_AMI_CALLBACK == 1 */

#if (TAO_HAS_PRIORITY_POLICIES == 1)

void operator<<= (CORBA::Any &_tao_any, const Messaging::PriorityRange &_tao_elem) // copying
{
  TAO_OutputCDR stream;
  stream << _tao_elem;
  _tao_any._tao_replace (
      Messaging::_tc_PriorityRange,
      TAO_ENCAP_BYTE_ORDER,
      stream.begin ()
    );
}

void operator<<= (CORBA::Any &_tao_any, Messaging::PriorityRange *_tao_elem) // non copying
{
  TAO_OutputCDR stream;
  stream << *_tao_elem;
  _tao_any._tao_replace (
      Messaging::_tc_PriorityRange,
      TAO_ENCAP_BYTE_ORDER,
      stream.begin (),
      1,
      _tao_elem,
      Messaging::PriorityRange::_tao_any_destructor
    );
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PriorityRange *&_tao_elem)
{
  return _tao_any >>= ACE_const_cast(const Messaging::PriorityRange*&,_tao_elem);
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::PriorityRange *&_tao_elem)
{
  _tao_elem = 0;
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();

    CORBA::Boolean result = type->equivalent (Messaging::_tc_PriorityRange ACE_ENV_ARG_PARAMETER);
    ACE_TRY_CHECK;

    if (!result)
      return 0; // not equivalent

    if (_tao_any.any_owns_data ())
    {
      _tao_elem = ACE_static_cast(
          const Messaging::PriorityRange*,
          _tao_any.value ()
        );
      return 1;
    }
    else
    {
      Messaging::PriorityRange *tmp;
      ACE_NEW_RETURN (tmp, Messaging::PriorityRange, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *tmp)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            Messaging::_tc_PriorityRange,
            1,
            ACE_static_cast (void *, tmp),
            Messaging::PriorityRange::_tao_any_destructor
          );
        _tao_elem = tmp;
        return 1;
      }
      else
      {
        delete tmp;
      }
    }
  }
  ACE_CATCHANY
  {
  }
  ACE_ENDTRY;
  return 0;
}


#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::RequestPriorityPolicy,Messaging::RequestPriorityPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::RequestPriorityPolicy,Messaging::RequestPriorityPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::ReplyPriorityPolicy,Messaging::ReplyPriorityPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::ReplyPriorityPolicy,Messaging::ReplyPriorityPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_PRIORITY_POLICIES == 1 */

#if (TAO_HAS_REQUEST_START_TIME_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::RequestStartTimePolicy,Messaging::RequestStartTimePolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::RequestStartTimePolicy,Messaging::RequestStartTimePolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_REQUEST_START_TIME_POLICY == 1 */

#if (TAO_HAS_REQUEST_END_TIME_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::RequestEndTimePolicy,Messaging::RequestEndTimePolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::RequestEndTimePolicy,Messaging::RequestEndTimePolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_REQUEST_END_TIME_POLICY == 1 */

#if (TAO_HAS_REPLY_START_TIME_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::ReplyStartTimePolicy,Messaging::ReplyStartTimePolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::ReplyStartTimePolicy,Messaging::ReplyStartTimePolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_REPLY_START_TIME_POLICY == 1 */

#if (TAO_HAS_REPLY_END_TIME_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::ReplyEndTimePolicy,Messaging::ReplyEndTimePolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::ReplyEndTimePolicy,Messaging::ReplyEndTimePolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_REPLY_END_TIME_POLICY == 1 */

#if (TAO_HAS_RELATIVE_REQUEST_TIMEOUT_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::RelativeRequestTimeoutPolicy,Messaging::RelativeRequestTimeoutPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::RelativeRequestTimeoutPolicy,Messaging::RelativeRequestTimeoutPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_RELATIVE_REQUEST_TIMEOUT_POLICY == 1 */

#if (TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::RelativeRoundtripTimeoutPolicy,Messaging::RelativeRoundtripTimeoutPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::RelativeRoundtripTimeoutPolicy,Messaging::RelativeRoundtripTimeoutPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1 */

#if (TAO_HAS_ROUTING_POLICY == 1)

void operator<<= (CORBA::Any &_tao_any, const Messaging::RoutingTypeRange &_tao_elem) // copying
{
  TAO_OutputCDR stream;
  stream << _tao_elem;
  _tao_any._tao_replace (
      Messaging::_tc_RoutingTypeRange,
      TAO_ENCAP_BYTE_ORDER,
      stream.begin ()
    );
}

void operator<<= (CORBA::Any &_tao_any, Messaging::RoutingTypeRange *_tao_elem) // non copying
{
  TAO_OutputCDR stream;
  stream << *_tao_elem;
  _tao_any._tao_replace (
      Messaging::_tc_RoutingTypeRange,
      TAO_ENCAP_BYTE_ORDER,
      stream.begin (),
      1,
      _tao_elem,
      Messaging::RoutingTypeRange::_tao_any_destructor
    );
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::RoutingTypeRange *&_tao_elem)
{
  return _tao_any >>= ACE_const_cast(const Messaging::RoutingTypeRange*&,_tao_elem);
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::RoutingTypeRange *&_tao_elem)
{
  _tao_elem = 0;
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();

    CORBA::Boolean result = type->equivalent (Messaging::_tc_RoutingTypeRange ACE_ENV_ARG_PARAMETER);
    ACE_TRY_CHECK;

    if (!result)
      return 0; // not equivalent

    if (_tao_any.any_owns_data ())
    {
      _tao_elem = ACE_static_cast(
          const Messaging::RoutingTypeRange*,
          _tao_any.value ()
        );
      return 1;
    }
    else
    {
      Messaging::RoutingTypeRange *tmp;
      ACE_NEW_RETURN (tmp, Messaging::RoutingTypeRange, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *tmp)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            Messaging::_tc_RoutingTypeRange,
            1,
            ACE_static_cast (void *, tmp),
            Messaging::RoutingTypeRange::_tao_any_destructor
          );
        _tao_elem = tmp;
        return 1;
      }
      else
      {
        delete tmp;
      }
    }
  }
  ACE_CATCHANY
  {
  }
  ACE_ENDTRY;
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::RoutingPolicy,Messaging::RoutingPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::RoutingPolicy,Messaging::RoutingPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_ROUTING_POLICY == 1 */

#if (TAO_HAS_MAX_HOPS_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::MaxHopsPolicy,Messaging::MaxHopsPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::MaxHopsPolicy,Messaging::MaxHopsPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_MAX_HOPS_POLICY == 1 */

#if (TAO_HAS_QUEUE_ORDER_POLICY == 1)

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::QueueOrderPolicy,Messaging::QueueOrderPolicy_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::QueueOrderPolicy,Messaging::QueueOrderPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

#endif /* TAO_HAS_QUEUE_ORDER_POLICY == 1 */

void operator<<= (CORBA::Any &_tao_any, const Messaging::PolicyValue &_tao_elem) // copying
{
  TAO_OutputCDR stream;
  stream << _tao_elem;
  _tao_any._tao_replace (
      Messaging::_tc_PolicyValue,
      TAO_ENCAP_BYTE_ORDER,
      stream.begin ()
    );
}

void operator<<= (CORBA::Any &_tao_any, Messaging::PolicyValue *_tao_elem) // non copying
{
  TAO_OutputCDR stream;
  stream << *_tao_elem;
  _tao_any._tao_replace (
      Messaging::_tc_PolicyValue,
      TAO_ENCAP_BYTE_ORDER,
      stream.begin (),
      1,
      _tao_elem,
      Messaging::PolicyValue::_tao_any_destructor
    );
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValue *&_tao_elem)
{
  return _tao_any >>= ACE_const_cast(const Messaging::PolicyValue*&,_tao_elem);
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::PolicyValue *&_tao_elem)
{
  _tao_elem = 0;
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();

    CORBA::Boolean result = type->equivalent (Messaging::_tc_PolicyValue ACE_ENV_ARG_PARAMETER);
    ACE_TRY_CHECK;

    if (!result)
      return 0; // not equivalent

    if (_tao_any.any_owns_data ())
    {
      _tao_elem = ACE_static_cast(
          const Messaging::PolicyValue*,
          _tao_any.value ()
        );
      return 1;
    }
    else
    {
      Messaging::PolicyValue *tmp;
      ACE_NEW_RETURN (tmp, Messaging::PolicyValue, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *tmp)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            Messaging::_tc_PolicyValue,
            1,
            ACE_static_cast (void *, tmp),
            Messaging::PolicyValue::_tao_any_destructor
          );
        _tao_elem = tmp;
        return 1;
      }
      else
      {
        delete tmp;
      }
    }
  }
  ACE_CATCHANY
  {
  }
  ACE_ENDTRY;
  return 0;
}

void operator<<= (
    CORBA::Any &_tao_any,
    const Messaging::PolicyValueSeq &_tao_elem
  ) // copying
{
  TAO_OutputCDR stream;
  if (stream << _tao_elem)
  {
    _tao_any._tao_replace (
        Messaging::_tc_PolicyValueSeq,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin ()
      );
  }
}

void operator<<= (CORBA::Any &_tao_any, Messaging::PolicyValueSeq *_tao_elem) // non copying
{
  TAO_OutputCDR stream;
  stream << *_tao_elem;
  _tao_any._tao_replace (
      Messaging::_tc_PolicyValueSeq,
      TAO_ENCAP_BYTE_ORDER,
      stream.begin (),
      1,
      _tao_elem,
      Messaging::PolicyValueSeq::_tao_any_destructor
    );
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::PolicyValueSeq *&_tao_elem)
{
  return _tao_any >>= ACE_const_cast(
      const Messaging::PolicyValueSeq*&,
      _tao_elem
    );
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const Messaging::PolicyValueSeq *&_tao_elem)
{
  _tao_elem = 0;
  ACE_TRY_NEW_ENV
  {
    CORBA::TypeCode_var type = _tao_any.type ();

    CORBA::Boolean result = type->equivalent (Messaging::_tc_PolicyValueSeq ACE_ENV_ARG_PARAMETER);
    ACE_TRY_CHECK;

    if (!result)
      return 0; // not equivalent

    if (_tao_any.any_owns_data ())
    {
      _tao_elem = ACE_static_cast(
          const Messaging::PolicyValueSeq*,
          _tao_any.value ()
        );
      return 1;
    }
    else
    {
      Messaging::PolicyValueSeq *tmp;
      ACE_NEW_RETURN (tmp, Messaging::PolicyValueSeq, 0);
      TAO_InputCDR stream (
          _tao_any._tao_get_cdr (),
          _tao_any._tao_byte_order ()
        );
      if (stream >> *tmp)
      {
        ((CORBA::Any *)&_tao_any)->_tao_replace (
            Messaging::_tc_PolicyValueSeq,
            1,
            ACE_static_cast (void *, tmp),
            Messaging::PolicyValueSeq::_tao_any_destructor
          );
        _tao_elem = tmp;
        return 1;
      }
      else
      {
        delete tmp;
      }
    }
  }
  ACE_CATCHANY
  {
  }
  ACE_ENDTRY;
  return 0;
}

#if (TAO_HAS_AMI_CALLBACK == 1) || (TAO_HAS_AMI_POLLER == 1)

void operator<<= (CORBA::Any &_tao_any, Messaging::ReplyHandler_ptr _tao_elem)
{
  TAO_OutputCDR stream;
  if (stream << _tao_elem)
  {
    _tao_any._tao_replace (
        Messaging::_tc_ReplyHandler,
        TAO_ENCAP_BYTE_ORDER,
        stream.begin (),
        1,
        Messaging::ReplyHandler::_duplicate (_tao_elem),
        Messaging::ReplyHandler::_tao_any_destructor
      );
  }
}

CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, Messaging::ReplyHandler_ptr &_tao_elem)
{
  ACE_TRY_NEW_ENV
  {
    _tao_elem = Messaging::ReplyHandler::_nil ();
    CORBA::TypeCode_var type = _tao_any.type ();

    CORBA::Boolean result = type->equivalent (Messaging::_tc_ReplyHandler ACE_ENV_ARG_PARAMETER);
    ACE_TRY_CHECK;

    if (!result)
      return 0; // not equivalent

    TAO_InputCDR stream (
        _tao_any._tao_get_cdr (),
        _tao_any._tao_byte_order ()
      );
    if (stream >> _tao_elem)
    {
      ((CORBA::Any *)&_tao_any)->_tao_replace (
          Messaging::_tc_ReplyHandler,
          1,
          _tao_elem,
          Messaging::ReplyHandler::_tao_any_destructor
        );
      return 1;
    }
  }
  ACE_CATCHANY
  {
    _tao_elem = Messaging::ReplyHandler::_nil ();
    return 0;
  }
  ACE_ENDTRY;
  _tao_elem = Messaging::ReplyHandler::_nil ();
  return 0;
}

#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)  || \
    defined (ACE_HAS_GNU_REPO)
    template class TAO_Object_Manager<Messaging::ReplyHandler,Messaging::ReplyHandler_var>;
  #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
  #  pragma instantiate TAO_Object_Manager<Messaging::ReplyHandler,Messaging::ReplyHandler_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */



#endif /* TAO_HAS_AMI_CALLBACK == 1 || TAO_HAS_AMI_POLLER == 1 */

#if !defined _TAO_CDR_OP_Messaging_PolicyValue__tao_seq_Octet_CPP_
#define _TAO_CDR_OP_Messaging_PolicyValue__tao_seq_Octet_CPP_

CORBA::Boolean operator<< (
    TAO_OutputCDR &strm,
    const Messaging::PolicyValue::_tao_seq_Octet &_tao_sequence
  )
{
  if (strm << _tao_sequence.length ())
  {
    // encode all elements

#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
    {
      TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
        ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (Messaging::PolicyValue::_tao_seq_Octet *)&_tao_sequence);
      if (oseq->mb ())
        return strm.write_octet_array_mb (oseq->mb ());
      else
        return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
    }

#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
    return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());

#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
  }
  return 0; // error
}

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    Messaging::PolicyValue::_tao_seq_Octet &_tao_sequence
  )
{
  CORBA::ULong _tao_seq_len;
  if (strm >> _tao_seq_len)
  {
    // set the length of the sequence
    _tao_sequence.length (_tao_seq_len);
    // If length is 0 we return true.
    if (0 >= _tao_seq_len)
      return 1;
    // retrieve all the elements

#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
    if (ACE_BIT_DISABLED (strm.start ()->flags (),
    ACE_Message_Block::DONT_DELETE))
    {
      TAO_ORB_Core* orb_core = strm.orb_core ();
      if (orb_core != 0 &&
      strm.orb_core ()->resource_factory ()->
      input_cdr_allocator_type_locked () == 1)
      {
        TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
          ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*, &_tao_sequence);
        oseq->replace (_tao_seq_len, strm.start ());
        oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len);
        strm.skip_bytes (_tao_seq_len);
        return 1;
      }
    }
    return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
    return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());

#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
  }
  return 0; // error
}

#endif /* _TAO_CDR_OP_Messaging_PolicyValue__tao_seq_Octet_CPP_ */

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

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    Messaging::PolicyValueSeq &_tao_sequence
  )
{
  CORBA::ULong _tao_seq_len;
  if (strm >> _tao_seq_len)
  {
    // 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_sequence.length () && _tao_marshal_flag; i++)
    {
      _tao_marshal_flag = (strm >> _tao_sequence[i]);
    }
    return _tao_marshal_flag;
  }
  return 0; // error
}

#if (TAO_HAS_AMI_CALLBACK == 1) || (TAO_HAS_AMI_POLLER == 1)

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

CORBA::Boolean operator>> (
    TAO_InputCDR &strm,
    Messaging::ReplyHandler_ptr &_tao_objref
  )
{
  ACE_TRY_NEW_ENV
  {
    CORBA::Object_var obj;
    if ((strm >> obj.inout ()) == 0)
      return 0;
    // narrow to the right type
    _tao_objref =
      Messaging::ReplyHandler::_unchecked_narrow (
          obj.in ()
           ACE_ENV_ARG_PARAMETER
        );
    ACE_TRY_CHECK;
    return 1;
  }
  ACE_CATCHANY
  {
    // do nothing
  }
  ACE_ENDTRY;
  return 0;
}

#endif /* TAO_HAS_AMI_CALLBACK == 1 || TAO_HAS_AMI_POLLER == 1 */

#endif /* TAO_HAS_CORBA_MESSAGING == 1 */
