Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / PortableServer / LifespanPolicy.cpp
blob04c9a86b4ce83f9f38c67804d5a07857c044e436
1 // -*- C++ -*-
2 #include "tao/PortableServer/LifespanPolicy.h"
3 #include "tao/PortableServer/PortableServer.h"
5 #include "ace/CORBA_macros.h"
7 #if !defined (CORBA_E_MICRO)
9 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
11 namespace TAO
13 namespace Portable_Server
15 LifespanPolicy::LifespanPolicy (
16 ::PortableServer::LifespanPolicyValue value) :
17 value_ (value)
21 CORBA::Policy_ptr
22 LifespanPolicy::copy ()
24 LifespanPolicy *copy = 0;
25 ACE_NEW_THROW_EX (copy,
26 LifespanPolicy (this->value_),
27 CORBA::NO_MEMORY ());
29 return copy;
32 void
33 LifespanPolicy::destroy ()
37 ::PortableServer::LifespanPolicyValue
38 LifespanPolicy::value ()
40 return value_;
43 CORBA::PolicyType
44 LifespanPolicy::policy_type ()
46 return ::PortableServer::LIFESPAN_POLICY_ID;
49 TAO_Cached_Policy_Type
50 LifespanPolicy::_tao_cached_type () const
52 return TAO_CACHED_POLICY_LIFESPAN;
55 TAO_Policy_Scope
56 LifespanPolicy::_tao_scope () const
58 return TAO_POLICY_POA_SCOPE;
63 TAO_END_VERSIONED_NAMESPACE_DECL
65 #endif