Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / EndpointPolicy / EndpointPolicy_i.cpp
blob726e96d31d3603f31914ebdac05d2f2c57279b7e
1 #include "tao/EndpointPolicy/EndpointPolicy_i.h"
2 #include "tao/SystemException.h"
4 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
6 TAO_EndpointPolicy_i::TAO_EndpointPolicy_i (const EndpointPolicy::EndpointList &value)
7 : value_ (value)
11 TAO_EndpointPolicy_i::TAO_EndpointPolicy_i (const TAO_EndpointPolicy_i &rhs)
12 : ::CORBA::Object ()
13 , ::CORBA::Policy ()
14 , ::EndpointPolicy::Policy ()
15 , ::CORBA::LocalObject ()
16 , value_ (rhs.value_)
20 TAO_EndpointPolicy_i::~TAO_EndpointPolicy_i ()
25 CORBA::PolicyType
26 TAO_EndpointPolicy_i::policy_type ()
28 return EndpointPolicy::ENDPOINT_POLICY_TYPE;
31 TAO_EndpointPolicy_i *
32 TAO_EndpointPolicy_i::clone () const
34 TAO_EndpointPolicy_i *copy = 0;
35 ACE_NEW_RETURN (copy,
36 TAO_EndpointPolicy_i (*this),
37 0);
38 return copy;
41 EndpointPolicy::EndpointList *
42 TAO_EndpointPolicy_i::value ()
44 EndpointPolicy::EndpointList* list = 0;
45 ACE_NEW_RETURN (list,
46 EndpointPolicy::EndpointList (this->value_),
47 0);
49 return list;
52 CORBA::Policy_ptr
53 TAO_EndpointPolicy_i::copy ()
55 TAO_EndpointPolicy_i* servant = 0;
56 ACE_NEW_THROW_EX (servant,
57 TAO_EndpointPolicy_i (*this),
58 CORBA::NO_MEMORY ());
60 return servant;
63 void
64 TAO_EndpointPolicy_i::destroy ()
66 this->value_.length (0);
69 TAO_Cached_Policy_Type
70 TAO_EndpointPolicy_i::_tao_cached_type () const
72 return TAO_CACHED_POLICY_ENDPOINT;
76 TAO_END_VERSIONED_NAMESPACE_DECL