Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030
00031
00032
00033
00034 template <class T> ACE_INLINE
00035 POA_CORBA::Policy_tie<T>::Policy_tie (T &t)
00036 : ptr_ (&t),
00037 poa_ (PortableServer::POA::_nil ()),
00038 rel_ (0)
00039 {}
00040
00041 template <class T> ACE_INLINE
00042 POA_CORBA::Policy_tie<T>::Policy_tie (T &t, PortableServer::POA_ptr poa)
00043 : ptr_ (&t),
00044 poa_ (PortableServer::POA::_duplicate (poa)),
00045 rel_ (0)
00046 {}
00047
00048 template <class T> ACE_INLINE
00049 POA_CORBA::Policy_tie<T>::Policy_tie (T *tp, CORBA::Boolean release)
00050 : ptr_ (tp),
00051 poa_ (PortableServer::POA::_nil ()),
00052 rel_ (release)
00053 {}
00054
00055 template <class T> ACE_INLINE
00056 POA_CORBA::Policy_tie<T>::Policy_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release)
00057 : ptr_ (tp),
00058 poa_ (PortableServer::POA::_duplicate (poa)),
00059 rel_ (release)
00060 {}
00061
00062 template <class T> ACE_INLINE
00063 POA_CORBA::Policy_tie<T>::~Policy_tie (void)
00064 {
00065 if (this->rel_)
00066 {
00067 delete this->ptr_;
00068 }
00069 }
00070
00071 template <class T> ACE_INLINE T *
00072 POA_CORBA::Policy_tie<T>::_tied_object (void)
00073 {
00074 return this->ptr_;
00075 }
00076
00077 template <class T> ACE_INLINE void
00078 POA_CORBA::Policy_tie<T>::_tied_object (T &obj)
00079 {
00080 if (this->rel_)
00081 {
00082 delete this->ptr_;
00083 }
00084
00085 this->ptr_ = &obj;
00086 this->rel_ = 0;
00087 }
00088
00089 template <class T> ACE_INLINE void
00090 POA_CORBA::Policy_tie<T>::_tied_object (T *obj, CORBA::Boolean release)
00091 {
00092 if (this->rel_)
00093 {
00094 delete this->ptr_;
00095 }
00096
00097 this->ptr_ = obj;
00098 this->rel_ = release;
00099 }
00100
00101 template <class T> ACE_INLINE CORBA::Boolean
00102 POA_CORBA::Policy_tie<T>::_is_owner (void)
00103 {
00104 return this->rel_;
00105 }
00106
00107 template <class T> ACE_INLINE void
00108 POA_CORBA::Policy_tie<T>::_is_owner (CORBA::Boolean b)
00109 {
00110 this->rel_ = b;
00111 }
00112
00113 template <class T> ACE_INLINE PortableServer::POA_ptr
00114 POA_CORBA::Policy_tie<T>::_default_POA (void)
00115 {
00116 if (!CORBA::is_nil (this->poa_.in ()))
00117 {
00118 return PortableServer::POA::_duplicate (this->poa_.in ());
00119 }
00120
00121 return this->Policy::_default_POA ();
00122 }
00123
00124
00125
00126
00127 template <class T> ACE_INLINE
00128 CORBA::PolicyType POA_CORBA::Policy_tie<T>::policy_type (
00129
00130 )
00131 {
00132 return this->ptr_->policy_type (
00133
00134 );
00135 }
00136
00137
00138
00139
00140 template <class T> ACE_INLINE
00141 ::CORBA::Policy_ptr POA_CORBA::Policy_tie<T>::copy (
00142 )
00143 {
00144 return this->ptr_->copy (
00145
00146 );
00147 }
00148
00149
00150
00151
00152 template <class T> ACE_INLINE
00153 void POA_CORBA::Policy_tie<T>::destroy (
00154
00155 )
00156 {
00157 this->ptr_->destroy (
00158
00159 );
00160 }
00161
00162 TAO_END_VERSIONED_NAMESPACE_DECL