// RT_Transport_Descriptor_Property.cpp,v 1.3 2003/10/28 18:29:32 bala Exp

#include "RT_Transport_Descriptor_Property.h"

#include "ace/OS_Memory.h"

#if ! defined (__ACE_INLINE__)
#include "RT_Transport_Descriptor_Property.inl"
#endif /* __ACE_INLINE__ */

ACE_RCSID (RTCORBA,
           TAO_RT_Transport_Descriptor_Property,
           "RT_Transport_Descriptor_Property.cpp,v 1.3 2003/10/28 18:29:32 bala Exp")

TAO_RT_Transport_Descriptor_Property::~TAO_RT_Transport_Descriptor_Property (void)
{
}

/*************************************************************************************************/

TAO_RT_Transport_Descriptor_Private_Connection_Property::~TAO_RT_Transport_Descriptor_Private_Connection_Property (void)
{
}

TAO_RT_Transport_Descriptor_Property*
TAO_RT_Transport_Descriptor_Private_Connection_Property::duplicate (void)
{
  // Construct a copy of our class
  TAO_RT_Transport_Descriptor_Private_Connection_Property *desc_prop = 0;

  ACE_NEW_RETURN (desc_prop,
                  TAO_RT_Transport_Descriptor_Private_Connection_Property (this->object_id_),
                  0);

  return desc_prop;
}

CORBA::Boolean
TAO_RT_Transport_Descriptor_Private_Connection_Property::is_equivalent (const TAO_RT_Transport_Descriptor_Property *other_prop)
{
  const TAO_RT_Transport_Descriptor_Private_Connection_Property *rhs =
    ACE_dynamic_cast (const TAO_RT_Transport_Descriptor_Private_Connection_Property*,
                      other_prop);
  return (rhs != 0 &&
          this->object_id_ == rhs->object_id_);
}

/*************************************************************************************************/

TAO_RT_Transport_Descriptor_Banded_Connection_Property::~TAO_RT_Transport_Descriptor_Banded_Connection_Property ()
{
}

TAO_RT_Transport_Descriptor_Property*
TAO_RT_Transport_Descriptor_Banded_Connection_Property::duplicate (void)
{
  // Construct a copy of our class
  TAO_RT_Transport_Descriptor_Banded_Connection_Property *desc_prop = 0;

  ACE_NEW_RETURN (desc_prop,
                  TAO_RT_Transport_Descriptor_Banded_Connection_Property (this->low_priority_,
                                  this->high_priority_),
                  0);

  return desc_prop;
}

CORBA::Boolean
TAO_RT_Transport_Descriptor_Banded_Connection_Property::is_equivalent (const TAO_RT_Transport_Descriptor_Property *other_prop)
{
  const TAO_RT_Transport_Descriptor_Banded_Connection_Property *rhs =
    ACE_dynamic_cast (const TAO_RT_Transport_Descriptor_Banded_Connection_Property*,
                      other_prop);

  return (rhs != 0 &&
          this->low_priority_ == rhs->low_priority_ &&
          this->high_priority_ == rhs->high_priority_);
}
