summaryrefslogtreecommitdiff
path: root/TAO/tao/Base_Transport_Property.cpp
blob: 17a83e1a6187a04f5b59176413a7a23c863a1231 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "tao/Base_Transport_Property.h"
#include "ace/OS_Memory.h"

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

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_Base_Transport_Property::~TAO_Base_Transport_Property ()
{
}

TAO_Transport_Descriptor_Interface *
TAO_Base_Transport_Property::duplicate ()
{
  // Get a copy of the underlying endpoint
  TAO_Endpoint *const endpt = this->endpoint_->duplicate ();
  if (endpt == nullptr)
    return nullptr;

  // Construct a copy of our class
  TAO_Base_Transport_Property *prop = nullptr;
  ACE_NEW_RETURN (prop, TAO_Base_Transport_Property (endpt, true), nullptr);
  return prop;
}


CORBA::Boolean
TAO_Base_Transport_Property::is_equivalent
  (const TAO_Transport_Descriptor_Interface *rhs)
{
  const TAO_Base_Transport_Property *other_desc =
    dynamic_cast<const TAO_Base_Transport_Property *> (rhs);

  if (other_desc == nullptr)
    return false;

  return this->endpoint_->is_equivalent (other_desc->endpoint_);
}


u_long
TAO_Base_Transport_Property::hash () const
{
  return this->endpoint_->hash ();
}

TAO_END_VERSIONED_NAMESPACE_DECL