Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Transport_Descriptor_Interface.cpp
blob7cfe705188f154ef5bb1fd880f6d14f79d786169
1 #include "tao/Transport_Descriptor_Interface.h"
3 #if !defined (__ACE_INLINE__)
4 # include "tao/Transport_Descriptor_Interface.inl"
5 #endif /* __ACE_INLINE__ */
7 #include "tao/Endpoint.h"
9 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
11 TAO_Transport_Descriptor_Interface::~TAO_Transport_Descriptor_Interface ()
13 if (this->release_)
15 delete this->endpoint_;
19 CORBA::Boolean
20 TAO_Transport_Descriptor_Interface::reset_endpoint (TAO_Endpoint *ep)
22 // calling on a dynamically allocation descriptor is not allowed.
23 if (this->release_)
24 return false;
26 for (TAO_Endpoint *ptr = this->endpoint_; ptr != nullptr; ptr = ptr->next())
28 if (ptr == ep)
30 this->endpoint_ = ep;
31 return true;
33 return false;
37 TAO_END_VERSIONED_NAMESPACE_DECL