summaryrefslogtreecommitdiff
path: root/TAO/tao/Seq_VarOut_T.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Seq_VarOut_T.cpp')
-rw-r--r--TAO/tao/Seq_VarOut_T.cpp84
1 files changed, 79 insertions, 5 deletions
diff --git a/TAO/tao/Seq_VarOut_T.cpp b/TAO/tao/Seq_VarOut_T.cpp
index e94be3f774e..412b12aa0a3 100644
--- a/TAO/tao/Seq_VarOut_T.cpp
+++ b/TAO/tao/Seq_VarOut_T.cpp
@@ -29,10 +29,12 @@ TAO_Seq_Var_Base_T<T,T_elem>::TAO_Seq_Var_Base_T (
}
}
+// ****************************************************************************
+
template<typename T, typename T_elem>
-TAO_Seq_Var_Base_T<T,T_elem> &
-TAO_Seq_Var_Base_T<T,T_elem>::operator= (
- const TAO_Seq_Var_Base_T<T,T_elem> & p
+TAO_FixedSeq_Var_T<T,T_elem> &
+TAO_FixedSeq_Var_T<T,T_elem>::operator= (
+ const TAO_FixedSeq_Var_T<T,T_elem> & p
)
{
if (this != &p)
@@ -64,8 +66,6 @@ TAO_Seq_Var_Base_T<T,T_elem>::operator= (
return *this;
}
-// ****************************************************************************
-
// Fixed-size types only.
template<typename T, typename T_elem>
TAO_FixedSeq_Var_T<T,T_elem> &
@@ -82,4 +82,78 @@ TAO_FixedSeq_Var_T<T,T_elem>::operator= (const T & p)
return *this;
}
+// ****************************************************************************
+
+template<typename T, typename T_elem>
+TAO_VarSeq_Var_T<T,T_elem> &
+TAO_VarSeq_Var_T<T,T_elem>::operator= (
+ const TAO_VarSeq_Var_T<T,T_elem> & p
+ )
+{
+ if (this != &p)
+ {
+ if (p.ptr_ == 0)
+ {
+ delete this->ptr_;
+ this->ptr_ = 0;
+ }
+ else
+ {
+ T * deep_copy = 0;
+ ACE_NEW_RETURN (
+ deep_copy,
+ T (*p.ptr_),
+ *this
+ );
+
+ if (deep_copy != 0)
+ {
+ T * tmp = deep_copy;
+ deep_copy = this->ptr_;
+ this->ptr_ = tmp;
+ delete deep_copy;
+ }
+ }
+ }
+
+ return *this;
+}
+
+// ****************************************************************************
+
+template<typename T, typename T_elem>
+TAO_MngSeq_Var_T<T,T_elem> &
+TAO_MngSeq_Var_T<T,T_elem>::operator= (
+ const TAO_MngSeq_Var_T<T,T_elem> & p
+ )
+{
+ if (this != &p)
+ {
+ if (p.ptr_ == 0)
+ {
+ delete this->ptr_;
+ this->ptr_ = 0;
+ }
+ else
+ {
+ T * deep_copy = 0;
+ ACE_NEW_RETURN (
+ deep_copy,
+ T (*p.ptr_),
+ *this
+ );
+
+ if (deep_copy != 0)
+ {
+ T * tmp = deep_copy;
+ deep_copy = this->ptr_;
+ this->ptr_ = tmp;
+ delete deep_copy;
+ }
+ }
+ }
+
+ return *this;
+}
+
#endif /* TAO_SEQ_VAROUT_T_C */