diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-07-01 03:30:58 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-07-01 03:30:58 +0000 |
commit | c4218b9725988b4e1061155c3616477a46d8425c (patch) | |
tree | 7b247d1ef21c897401827a3d90d41e82d2fdd8d6 /TAO/tao/Valuetype/Value_VarOut_T.cpp | |
parent | d1f4ec89b4761404ac8678402752bf65eaa60485 (diff) | |
download | ATCD-refactor-stage4.tar.gz |
ChangeLogTag:Mon Jun 30 22:29:51 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>refactor-stage4
Diffstat (limited to 'TAO/tao/Valuetype/Value_VarOut_T.cpp')
-rw-r--r-- | TAO/tao/Valuetype/Value_VarOut_T.cpp | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/TAO/tao/Valuetype/Value_VarOut_T.cpp b/TAO/tao/Valuetype/Value_VarOut_T.cpp index 9ee88a39c8f..6b3bbb8b541 100644 --- a/TAO/tao/Valuetype/Value_VarOut_T.cpp +++ b/TAO/tao/Valuetype/Value_VarOut_T.cpp @@ -9,6 +9,22 @@ ACE_RCSID (tao, Value_VarOut_T, "$Id$") +template<typename T> +void +TAO::Value_Traits<T>::tao_add_ref (T * p) +{ + CORBA::add_ref (p); +} + +template<typename T> +void +TAO::Value_Traits<T>::tao_remove_ref (T * p) +{ + CORBA::remove_ref (p); +} + +// =============================================================== + template <typename T, typename T_life> TAO_Value_Var_T<T,T_life>::TAO_Value_Var_T (void) : ptr_ (0) @@ -36,21 +52,21 @@ TAO_Value_Var_T<T,T_life>::TAO_Value_Var_T ( const TAO_Value_Var_T<T,T_life> & p ) { - T_life::tao_add_ref (p.ptr ()); + TAO::Value_Traits<T>::tao_add_ref (p.ptr ()); this->ptr_ = p.ptr (); } template <typename T, typename T_life> TAO_Value_Var_T<T,T_life>::~TAO_Value_Var_T (void) { - T_life::tao_remove_ref (this->ptr_); + TAO::Value_Traits<T>::tao_remove_ref (this->ptr_); } template <typename T, typename T_life> TAO_Value_Var_T<T,T_life> & TAO_Value_Var_T<T,T_life>::operator= (T * p) { - T_life::tao_remove_ref (this->ptr_); + TAO::Value_Traits<T>::tao_remove_ref (this->ptr_); this->ptr_ = p; return *this; } @@ -61,9 +77,9 @@ TAO_Value_Var_T<T,T_life>::operator= (const TAO_Value_Var_T & p) { if (this != &p) { - T_life::tao_remove_ref (this->ptr_); + TAO::Value_Traits<T>::tao_remove_ref (this->ptr_); T * tmp = p.ptr (); - T_life::tao_add_ref (tmp); + TAO::Value_Traits<T>::tao_add_ref (tmp); this->ptr_ = tmp; } @@ -107,7 +123,7 @@ template <typename T, typename T_life> T *& TAO_Value_Var_T<T,T_life>::out (void) { - T_life::tao_remove_ref (this->ptr_); + TAO::Value_Traits<T>::tao_remove_ref (this->ptr_); this->ptr_ = 0; return this->ptr_; } @@ -134,7 +150,7 @@ template <typename T, typename T_life> TAO_Value_Out_T<T,T_life>::TAO_Value_Out_T (TAO_Value_Var_T<T,T_life> & p) : ptr_ (p.out ()) { - T_life::tao_remove_ref (this->ptr_); + TAO::Value_Traits<T>::tao_remove_ref (this->ptr_); this->ptr_ = 0; } @@ -156,7 +172,7 @@ TAO_Value_Out_T<T,T_life> & TAO_Value_Out_T<T,T_life>::operator= (const TAO_Value_Var_T<T,T_life> & p) { T * tmp = p.ptr (); - T_life::tao_add_ref (tmp); + TAO::Value_Traits<T>::tao_add_ref (tmp); this->ptr_ = tmp; return *this; } |