00001 // -*- C++ -*- 00002 // 00003 // $Id: Pseudo_VarOut_T.inl 90386 2010-06-02 13:52:08Z vzykov $ 00004 00005 #include "tao/CORBA_methods.h" 00006 00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00008 00009 template <typename T> 00010 ACE_INLINE 00011 TAO_Pseudo_Var_T<T>::TAO_Pseudo_Var_T (void) 00012 : ptr_ (T::_nil ()) 00013 {} 00014 00015 template <typename T> 00016 ACE_INLINE 00017 TAO_Pseudo_Var_T<T>::TAO_Pseudo_Var_T (typename T::_ptr_type p) 00018 : ptr_ (p) 00019 {} 00020 00021 template <typename T> 00022 ACE_INLINE 00023 TAO_Pseudo_Var_T<T>::TAO_Pseudo_Var_T (const TAO_Pseudo_Var_T<T> & p) 00024 : TAO_Base_var () 00025 , ptr_ (T::_duplicate (p.ptr ())) 00026 {} 00027 00028 template <typename T> 00029 ACE_INLINE 00030 TAO_Pseudo_Var_T<T>::~TAO_Pseudo_Var_T (void) 00031 { 00032 ::CORBA::release (this->ptr_); 00033 } 00034 00035 template <typename T> 00036 ACE_INLINE 00037 TAO_Pseudo_Var_T<T> & 00038 TAO_Pseudo_Var_T<T>::operator= (typename T::_ptr_type p) 00039 { 00040 ::CORBA::release (this->ptr_); 00041 this->ptr_ = p; 00042 return *this; 00043 } 00044 00045 template <typename T> 00046 ACE_INLINE 00047 TAO_Pseudo_Var_T<T>::operator typename T::_ptr_type const & () const 00048 { 00049 return this->ptr_; 00050 } 00051 00052 template <typename T> 00053 ACE_INLINE 00054 TAO_Pseudo_Var_T<T>::operator typename T::_ptr_type & () 00055 { 00056 return this->ptr_; 00057 } 00058 00059 template <typename T> 00060 ACE_INLINE 00061 typename T::_ptr_type 00062 TAO_Pseudo_Var_T<T>::operator-> (void) const 00063 { 00064 return this->ptr_; 00065 } 00066 00067 template <typename T> 00068 ACE_INLINE 00069 typename T::_ptr_type 00070 TAO_Pseudo_Var_T<T>::in (void) const 00071 { 00072 return this->ptr_; 00073 } 00074 00075 template <typename T> 00076 ACE_INLINE 00077 typename T::_ptr_type & 00078 TAO_Pseudo_Var_T<T>::inout (void) 00079 { 00080 return this->ptr_; 00081 } 00082 00083 template <typename T> 00084 ACE_INLINE 00085 typename T::_ptr_type & 00086 TAO_Pseudo_Var_T<T>::out (void) 00087 { 00088 ::CORBA::release (this->ptr_); 00089 this->ptr_ = T::_nil (); 00090 return this->ptr_; 00091 } 00092 00093 template <typename T> 00094 ACE_INLINE 00095 typename T::_ptr_type 00096 TAO_Pseudo_Var_T<T>::_retn (void) 00097 { 00098 typename T::_ptr_type val = this->ptr_; 00099 this->ptr_ = T::_nil (); 00100 return val; 00101 } 00102 00103 template <typename T> 00104 ACE_INLINE 00105 typename T::_ptr_type 00106 TAO_Pseudo_Var_T<T>::ptr (void) const 00107 { 00108 return this->ptr_; 00109 } 00110 00111 // ************************************************************* 00112 00113 template <typename T> 00114 ACE_INLINE 00115 TAO_Pseudo_Out_T<T>::TAO_Pseudo_Out_T (typename T::_ptr_type & p) 00116 : ptr_ (p) 00117 { 00118 this->ptr_ = T::_nil (); 00119 } 00120 00121 template <typename T> 00122 ACE_INLINE 00123 TAO_Pseudo_Out_T<T>::TAO_Pseudo_Out_T (typename T::_var_type & p) 00124 : ptr_ (p.out ()) 00125 { 00126 ::CORBA::release (this->ptr_); 00127 this->ptr_ = T::_nil (); 00128 } 00129 00130 template <typename T> 00131 ACE_INLINE 00132 TAO_Pseudo_Out_T<T>::TAO_Pseudo_Out_T ( 00133 const TAO_Pseudo_Out_T<T> & p 00134 ) 00135 : ptr_ (p.ptr_) 00136 {} 00137 00138 template <typename T> 00139 ACE_INLINE 00140 TAO_Pseudo_Out_T<T> & 00141 TAO_Pseudo_Out_T<T>::operator= (const TAO_Pseudo_Out_T<T> & p) 00142 { 00143 this->ptr_ = p.ptr_; 00144 return *this; 00145 } 00146 00147 template <typename T> 00148 ACE_INLINE 00149 TAO_Pseudo_Out_T<T> & 00150 TAO_Pseudo_Out_T<T>::operator= (typename T::_ptr_type p) 00151 { 00152 this->ptr_ = p; 00153 return *this; 00154 } 00155 00156 template <typename T> 00157 ACE_INLINE 00158 typename T::_ptr_type & 00159 TAO_Pseudo_Out_T<T>::ptr (void) 00160 { 00161 return this->ptr_; 00162 } 00163 00164 template <typename T> 00165 ACE_INLINE 00166 TAO_Pseudo_Out_T<T>::operator typename T::_ptr_type & () 00167 { 00168 return this->ptr_; 00169 } 00170 00171 template <typename T> 00172 ACE_INLINE 00173 typename T::_ptr_type 00174 TAO_Pseudo_Out_T<T>::operator-> (void) 00175 { 00176 return this->ptr_; 00177 } 00178 00179 TAO_END_VERSIONED_NAMESPACE_DECL