summaryrefslogtreecommitdiff
path: root/TAO/tao/Sequence_T.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-08 21:36:06 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-08 21:36:06 +0000
commit40ab291ed36f4b46da82435b700a13c49785ab6e (patch)
tree3b0537b48367dd31f88fc403c546e457072c0777 /TAO/tao/Sequence_T.cpp
parent00516ac7b16f71040380d5954724fdcd02a145c8 (diff)
downloadATCD-40ab291ed36f4b46da82435b700a13c49785ab6e.tar.gz
ChangeLogTag:Thu Jul 8 16:30:40 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Sequence_T.cpp')
-rw-r--r--TAO/tao/Sequence_T.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/TAO/tao/Sequence_T.cpp b/TAO/tao/Sequence_T.cpp
index 658b5d15af5..291aa27fb9b 100644
--- a/TAO/tao/Sequence_T.cpp
+++ b/TAO/tao/Sequence_T.cpp
@@ -264,6 +264,64 @@ TAO_Object_Manager<T,T_var>::operator=(T_var &p)
}
// *************************************************************
+// class TAO_Pseudo_Object_Manager
+// *************************************************************
+
+template <class T, class T_var> TAO_Pseudo_Object_Manager<T,T_var>&
+TAO_Pseudo_Object_Manager<T,T_var>::
+ operator= (const TAO_Pseudo_Object_Manager<T,T_var> &rhs)
+{
+ if (this == &rhs)
+ return *this;
+
+ if (this->release_)
+ {
+ CORBA::release (*this->ptr_);
+ *this->ptr_ = T::_duplicate (*rhs.ptr_);
+ }
+ else
+ *this->ptr_ = *rhs.ptr_;
+
+ return *this;
+}
+
+template <class T, class T_var> TAO_Pseudo_Object_Manager<T,T_var> &
+TAO_Pseudo_Object_Manager<T,T_var>::operator=(T* p)
+{
+ if (this->release_)
+ {
+ // The semantics of the elements of a sequence are the same as
+ // that of a var variable. Therefore we will not duplicate the
+ // user provided pointer before assigning it to the internal
+ // variable. However, we will release it.
+ CORBA::release (*this->ptr_);
+ *this->ptr_ = p;
+ }
+ else
+ *this->ptr_ = p;
+
+ return *this;
+}
+
+template <class T, class T_var> TAO_Pseudo_Object_Manager<T,T_var> &
+TAO_Pseudo_Object_Manager<T,T_var>::operator=(T_var &p)
+{
+ if (this->release_)
+ {
+ // The semantics of the elements of a sequence are the same as
+ // that of a var variable. Therefore we will not duplicate the
+ // user provided pointer before assigning it to the internal
+ // variable. However, we will release it.
+ CORBA::release (*this->ptr_);
+ *this->ptr_ = T::_duplicate (p.in ());
+ }
+ else
+ *this->ptr_ = p.in ();
+
+ return *this;
+}
+
+// *************************************************************
// Operations for class TAO_Unbounded_Object_Sequence
// *************************************************************