summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/tao/DomainC.cpp14
-rw-r--r--TAO/tao/DomainC.h6
-rw-r--r--TAO/tao/DomainC.i4
-rw-r--r--TAO/tao/PolicyC.cpp14
-rw-r--r--TAO/tao/PolicyC.h6
-rw-r--r--TAO/tao/PolicyC.i4
-rw-r--r--TAO/tao/Request.cpp14
-rw-r--r--TAO/tao/Request.h2
-rw-r--r--TAO/tao/Sequence_T.cpp254
-rw-r--r--TAO/tao/Sequence_T.h49
-rw-r--r--TAO/tao/Sequence_T.i94
-rw-r--r--TAO/tao/corbafwd.h2
12 files changed, 242 insertions, 221 deletions
diff --git a/TAO/tao/DomainC.cpp b/TAO/tao/DomainC.cpp
index a65736ba3a1..5225ef0d89c 100644
--- a/TAO/tao/DomainC.cpp
+++ b/TAO/tao/DomainC.cpp
@@ -268,21 +268,21 @@ CORBA_DomainManagerList::CORBA_DomainManagerList (void)
{}
CORBA_DomainManagerList::CORBA_DomainManagerList (CORBA::ULong max) // uses max size
- : TAO_Unbounded_Object_Sequence<CORBA_DomainManager> (max)
+ : TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var> (max)
{}
CORBA_DomainManagerList::CORBA_DomainManagerList (CORBA::ULong max,
CORBA::ULong length,
CORBA_DomainManager_ptr *buffer,
CORBA::Boolean release)
- : TAO_Unbounded_Object_Sequence<CORBA_DomainManager> (max,
+ : TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var> (max,
length,
buffer,
release)
{}
CORBA_DomainManagerList::CORBA_DomainManagerList (const CORBA_DomainManagerList &seq) // copy ctor
- : TAO_Unbounded_Object_Sequence<CORBA_DomainManager> (seq)
+ : TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var> (seq)
{}
CORBA_DomainManagerList::~CORBA_DomainManagerList (void) // dtor
@@ -340,12 +340,12 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_DomainManager_ptr
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class TAO_Object_Field_T<CORBA_DomainManager>;
- template class TAO_Unbounded_Object_Sequence<CORBA_DomainManager>;
- template class TAO_Object_Manager<CORBA_DomainManager>;
+ template class TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var>;
+ template class TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
# pragma instantiate TAO_Object_Field_T<CORBA_DomainManager>
-# pragma instantiate TAO_Unbounded_Object_Sequence<CORBA_DomainManager>
-# pragma instantiate TAO_Object_Manager<CORBA_DomainManager>
+# pragma instantiate TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var>
+# pragma instantiate TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
#if ! defined (TAO_HAS_MINIMUM_CORBA)
diff --git a/TAO/tao/DomainC.h b/TAO/tao/DomainC.h
index d618b37ef80..454cf84253c 100644
--- a/TAO/tao/DomainC.h
+++ b/TAO/tao/DomainC.h
@@ -120,7 +120,7 @@ private:
// DomainManagerList
// *************************************************************
-class TAO_Export CORBA_DomainManagerList : public TAO_Unbounded_Object_Sequence<CORBA_DomainManager>
+class TAO_Export CORBA_DomainManagerList : public TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var>
{
public:
CORBA_DomainManagerList (void); // default ctor
@@ -158,7 +158,7 @@ public:
operator CORBA_DomainManagerList &();
operator CORBA_DomainManagerList &() const;
- TAO_Object_Manager<CORBA_DomainManager> operator[] (CORBA::ULong slot);
+ TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var> operator[] (CORBA::ULong slot);
// in, inout, out, _retn
const CORBA_DomainManagerList &in (void) const;
CORBA_DomainManagerList &inout (void);
@@ -182,7 +182,7 @@ public:
CORBA_DomainManagerList *&ptr (void);
CORBA_DomainManagerList *operator-> (void);
- TAO_Object_Manager<CORBA_DomainManager> operator[] (CORBA::ULong slot);
+ TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var> operator[] (CORBA::ULong slot);
private:
CORBA_DomainManagerList *&ptr_;
diff --git a/TAO/tao/DomainC.i b/TAO/tao/DomainC.i
index 354178ddc80..8b8215da41c 100644
--- a/TAO/tao/DomainC.i
+++ b/TAO/tao/DomainC.i
@@ -446,7 +446,7 @@ CORBA_DomainManagerList_var::operator CORBA_DomainManagerList &() const// cast
return *this->ptr_;
}
-ACE_INLINE TAO_Object_Manager<CORBA_DomainManager>
+ACE_INLINE TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>
CORBA_DomainManagerList_var::operator[] (CORBA::ULong slot)
{
return this->ptr_->operator[] (slot);
@@ -543,7 +543,7 @@ CORBA_DomainManagerList_out::operator-> (void)
return this->ptr_;
}
-ACE_INLINE TAO_Object_Manager<CORBA_DomainManager>
+ACE_INLINE TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>
CORBA_DomainManagerList_out::operator[] (CORBA::ULong slot)
{
return this->ptr_->operator[] (slot);
diff --git a/TAO/tao/PolicyC.cpp b/TAO/tao/PolicyC.cpp
index 1d7a087c327..d444ce0d785 100644
--- a/TAO/tao/PolicyC.cpp
+++ b/TAO/tao/PolicyC.cpp
@@ -380,13 +380,13 @@ CORBA_Policy::_nil (void)
CORBA_PolicyList::CORBA_PolicyList (void)
{}
CORBA_PolicyList::CORBA_PolicyList (CORBA::ULong max) // uses max size
- : TAO_Unbounded_Object_Sequence<CORBA_Policy> (max)
+ : TAO_Unbounded_Object_Sequence<CORBA_Policy,CORBA_Policy_var> (max)
{}
CORBA_PolicyList::CORBA_PolicyList (CORBA::ULong max, CORBA::ULong length, CORBA_Policy_ptr *buffer, CORBA::Boolean release)
- : TAO_Unbounded_Object_Sequence<CORBA_Policy> (max, length, buffer, release)
+ : TAO_Unbounded_Object_Sequence<CORBA_Policy,CORBA_Policy_var> (max, length, buffer, release)
{}
CORBA_PolicyList::CORBA_PolicyList (const CORBA_PolicyList &seq) // copy ctor
- : TAO_Unbounded_Object_Sequence<CORBA_Policy> (seq)
+ : TAO_Unbounded_Object_Sequence<CORBA_Policy,CORBA_Policy_var> (seq)
{}
CORBA_PolicyList::~CORBA_PolicyList (void) // dtor
{}
@@ -958,8 +958,8 @@ operator>> (
template class TAO_Unbounded_Sequence<CORBA::UShort>;
template class TAO_Unbounded_Sequence<CORBA::ULong>;
-template class TAO_Unbounded_Object_Sequence<CORBA_Policy>;
-template class TAO_Object_Manager<CORBA_Policy>;
+template class TAO_Unbounded_Object_Sequence<CORBA_Policy,CORBA_Policy_var>;
+template class TAO_Object_Manager<CORBA_Policy,CORBA_Policy_var>;
// template class TAO_Object_Field_T<CORBA_Policy>;
// template class TAO_Object_Field_T<CORBA_PolicyManager>;
@@ -969,8 +969,8 @@ template class TAO_Object_Manager<CORBA_Policy>;
#pragma instantiate TAO_Unbounded_Sequence<CORBA::UShort>
#pragma instantiate TAO_Unbounded_Sequence<CORBA::ULong>
-#pragma instantiate TAO_Unbounded_Object_Sequence<CORBA_Policy>
-#pragma instantiate TAO_Object_Manager<CORBA_Policy>
+#pragma instantiate TAO_Unbounded_Object_Sequence<CORBA_Policy,CORBA_Policy_var>
+#pragma instantiate TAO_Object_Manager<CORBA_Policy,CORBA_Policy_var>
//# pragma instantiate TAO_Object_Field_T<CORBA_Policy>
//# pragma instantiate TAO_Object_Field_T<CORBA_PolicyManager>
diff --git a/TAO/tao/PolicyC.h b/TAO/tao/PolicyC.h
index ad0187265ce..59471fd8b1e 100644
--- a/TAO/tao/PolicyC.h
+++ b/TAO/tao/PolicyC.h
@@ -182,7 +182,7 @@ private:
// CORBA_PolicyList
// *************************************************************
-class TAO_Export CORBA_PolicyList : public TAO_Unbounded_Object_Sequence<CORBA_Policy>
+class TAO_Export CORBA_PolicyList : public TAO_Unbounded_Object_Sequence<CORBA_Policy,CORBA_Policy_var>
{
public:
#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
@@ -223,7 +223,7 @@ public:
operator const CORBA_PolicyList &() const;
operator CORBA_PolicyList &();
operator CORBA_PolicyList &() const;
- TAO_Object_Manager <CORBA_Policy > operator[] (CORBA::ULong index);
+ TAO_Object_Manager <CORBA_Policy,CORBA_Policy_var > operator[] (CORBA::ULong index);
// in, inout, out, _retn
const CORBA_PolicyList &in (void) const;
CORBA_PolicyList &inout (void);
@@ -246,7 +246,7 @@ public:
operator CORBA_PolicyList *&();
CORBA_PolicyList *&ptr (void);
CORBA_PolicyList *operator-> (void);
- TAO_Object_Manager <CORBA_Policy > operator[] (CORBA::ULong index);
+ TAO_Object_Manager <CORBA_Policy,CORBA_Policy_var> operator[] (CORBA::ULong index);
private:
CORBA_PolicyList *&ptr_;
diff --git a/TAO/tao/PolicyC.i b/TAO/tao/PolicyC.i
index e7eac539a4d..9a845dbec38 100644
--- a/TAO/tao/PolicyC.i
+++ b/TAO/tao/PolicyC.i
@@ -301,7 +301,7 @@ CORBA_PolicyList_var::operator CORBA_PolicyList &() const// cast
return *this->ptr_;
}
-ACE_INLINE TAO_Object_Manager <CORBA_Policy >
+ACE_INLINE TAO_Object_Manager <CORBA_Policy,CORBA_Policy_var >
CORBA_PolicyList_var::operator[] (CORBA::ULong slot)
{
return this->ptr_->operator[] (slot);
@@ -398,7 +398,7 @@ CORBA_PolicyList_out::operator-> (void)
return this->ptr_;
}
-ACE_INLINE TAO_Object_Manager <CORBA_Policy >
+ACE_INLINE TAO_Object_Manager <CORBA_Policy,CORBA_Policy_var >
CORBA_PolicyList_out::operator[] (CORBA::ULong slot)
{
return this->ptr_->operator[] (slot);
diff --git a/TAO/tao/Request.cpp b/TAO/tao/Request.cpp
index 0cdb1c1224a..d24f0d5b2bf 100644
--- a/TAO/tao/Request.cpp
+++ b/TAO/tao/Request.cpp
@@ -156,13 +156,13 @@ CORBA_Request::poll_response (CORBA::Environment &ACE_TRY_ENV)
// constructor.
CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max)
- : TAO_Unbounded_Pseudo_Sequence <CORBA_Request> (max)
+ : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (max)
{
// no-op
}
CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (const CORBA_ORB_RequestSeq &rhs)
- : TAO_Unbounded_Pseudo_Sequence <CORBA_Request> (rhs)
+ : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (rhs)
{
// no-op
}
@@ -171,7 +171,7 @@ CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max,
CORBA::ULong length,
CORBA_Request **data,
CORBA::Boolean release)
- : TAO_Unbounded_Pseudo_Sequence <CORBA_Request> (max,
+ : TAO_Unbounded_Pseudo_Sequence <CORBA_Request,CORBA_Request_var> (max,
length,
data,
release)
@@ -400,11 +400,11 @@ CORBA_ORB_RequestSeq::replace (CORBA::ULong max,
*/
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class TAO_Unbounded_Pseudo_Sequence<CORBA_Request>;
-template class TAO_Object_Manager<CORBA_Request>;
+template class TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>;
+template class TAO_Object_Manager<CORBA_Request,CORBA_Request_var>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate TAO_Unbounded_Pseudo_Sequence<CORBA_Request>
-#pragma instantiate TAO_Object_Manager<CORBA_Request>
+#pragma instantiate TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>
+#pragma instantiate TAO_Object_Manager<CORBA_Request,CORBA_Request_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
#endif /* TAO_HAS_MINIMUM_CORBA */
diff --git a/TAO/tao/Request.h b/TAO/tao/Request.h
index 74d9322ce5d..f2f65864578 100644
--- a/TAO/tao/Request.h
+++ b/TAO/tao/Request.h
@@ -248,7 +248,7 @@ private:
};
// Make sure you instantiate this in Request.cpp
-class CORBA_ORB_RequestSeq : public TAO_Unbounded_Pseudo_Sequence<CORBA_Request>
+class CORBA_ORB_RequestSeq : public TAO_Unbounded_Pseudo_Sequence<CORBA_Request,CORBA_Request_var>
{
public:
// Helpful with template programming.
diff --git a/TAO/tao/Sequence_T.cpp b/TAO/tao/Sequence_T.cpp
index c753666365f..eec6e7f8c3f 100644
--- a/TAO/tao/Sequence_T.cpp
+++ b/TAO/tao/Sequence_T.cpp
@@ -192,9 +192,9 @@ TAO_Bounded_Sequence<T, MAX>::_deallocate_buffer (void)
// class TAO_Object_Manager
// *************************************************************
-template <class T>
-TAO_Object_Manager<T>&
-TAO_Object_Manager<T>::operator= (const TAO_Object_Manager<T> &rhs)
+template <class T,class T_var>
+TAO_Object_Manager<T,T_var>&
+TAO_Object_Manager<T,T_var>::operator= (const TAO_Object_Manager<T,T_var> &rhs)
{
if (this == &rhs)
return *this;
@@ -210,8 +210,8 @@ TAO_Object_Manager<T>::operator= (const TAO_Object_Manager<T> &rhs)
return *this;
}
-template <class T>TAO_Object_Manager<T> &
-TAO_Object_Manager<T>::operator=(T* p)
+template <class T,class T_var>TAO_Object_Manager<T,T_var> &
+TAO_Object_Manager<T,T_var>::operator=(T* p)
{
if (this->release_)
{
@@ -228,25 +228,43 @@ TAO_Object_Manager<T>::operator=(T* p)
return *this;
}
+template <class T,class T_var>TAO_Object_Manager<T,T_var> &
+TAO_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
// *************************************************************
// constructor for unbounded seq
-template <class T>
-TAO_Unbounded_Object_Sequence<T>::
+template <class T,class T_var>
+TAO_Unbounded_Object_Sequence<T,T_var>::
TAO_Unbounded_Object_Sequence (CORBA::ULong maximum)
: TAO_Unbounded_Base_Sequence (maximum,
- TAO_Unbounded_Object_Sequence<T>::allocbuf (maximum))
+ TAO_Unbounded_Object_Sequence<T,T_var>::allocbuf (maximum))
{
}
-template <class T>
-TAO_Unbounded_Object_Sequence<T>::
-TAO_Unbounded_Object_Sequence (const TAO_Unbounded_Object_Sequence<T> &rhs)
+template <class T,class T_var>
+TAO_Unbounded_Object_Sequence<T,T_var>::
+TAO_Unbounded_Object_Sequence (const TAO_Unbounded_Object_Sequence<T,T_var> &rhs)
: TAO_Unbounded_Base_Sequence (rhs)
{
- T **tmp1 = TAO_Unbounded_Object_Sequence<T>::allocbuf (this->maximum_);
+ T **tmp1 = TAO_Unbounded_Object_Sequence<T,T_var>::allocbuf (this->maximum_);
T ** const tmp2 = ACE_reinterpret_cast (T ** ACE_CAST_CONST, rhs.buffer_);
for (CORBA::ULong i = 0; i < rhs.length_; ++i)
@@ -255,16 +273,16 @@ TAO_Unbounded_Object_Sequence (const TAO_Unbounded_Object_Sequence<T> &rhs)
this->buffer_ = tmp1;
}
-template<class T>
-TAO_Unbounded_Object_Sequence<T>::~TAO_Unbounded_Object_Sequence (void)
+template<class T,class T_var>
+TAO_Unbounded_Object_Sequence<T,T_var>::~TAO_Unbounded_Object_Sequence (void)
{
this->_deallocate_buffer ();
}
// assignment operator
-template <class T>TAO_Unbounded_Object_Sequence<T>&
-TAO_Unbounded_Object_Sequence<T>::
-operator= (const TAO_Unbounded_Object_Sequence<T> &rhs)
+template <class T,class T_var>TAO_Unbounded_Object_Sequence<T,T_var>&
+TAO_Unbounded_Object_Sequence<T,T_var>::
+operator= (const TAO_Unbounded_Object_Sequence<T,T_var> &rhs)
{
if (this == &rhs)
return *this;
@@ -281,14 +299,14 @@ operator= (const TAO_Unbounded_Object_Sequence<T> &rhs)
}
if (this->maximum_ < rhs.maximum_)
{
- TAO_Unbounded_Object_Sequence<T>::freebuf (tmp);
+ TAO_Unbounded_Object_Sequence<T,T_var>::freebuf (tmp);
this->buffer_ =
- TAO_Unbounded_Object_Sequence<T>::allocbuf (rhs.maximum_);
+ TAO_Unbounded_Object_Sequence<T,T_var>::allocbuf (rhs.maximum_);
}
}
else
this->buffer_ =
- TAO_Unbounded_Object_Sequence<T>::allocbuf (rhs.maximum_);
+ TAO_Unbounded_Object_Sequence<T,T_var>::allocbuf (rhs.maximum_);
TAO_Unbounded_Base_Sequence::operator= (rhs);
@@ -301,8 +319,8 @@ operator= (const TAO_Unbounded_Object_Sequence<T> &rhs)
return *this;
}
-template <class T> T **
-TAO_Unbounded_Object_Sequence<T>::allocbuf (CORBA::ULong nelems)
+template <class T,class T_var> T **
+TAO_Unbounded_Object_Sequence<T,T_var>::allocbuf (CORBA::ULong nelems)
{
T **buf;
@@ -314,8 +332,8 @@ TAO_Unbounded_Object_Sequence<T>::allocbuf (CORBA::ULong nelems)
return buf;
}
-template <class T> void
-TAO_Unbounded_Object_Sequence<T>::freebuf (T **buffer)
+template <class T,class T_var> void
+TAO_Unbounded_Object_Sequence<T,T_var>::freebuf (T **buffer)
{
if (buffer == 0)
return;
@@ -335,10 +353,10 @@ TAO_Unbounded_Object_Sequence<T>::freebuf (T **buffer)
delete[] buffer;
}
-template<class T> void
-TAO_Unbounded_Object_Sequence<T>::_allocate_buffer (CORBA::ULong length)
+template<class T,class T_var> void
+TAO_Unbounded_Object_Sequence<T,T_var>::_allocate_buffer (CORBA::ULong length)
{
- T **tmp = TAO_Unbounded_Object_Sequence<T>::allocbuf (length);
+ T **tmp = TAO_Unbounded_Object_Sequence<T,T_var>::allocbuf (length);
if (this->buffer_ != 0)
{
@@ -360,8 +378,8 @@ TAO_Unbounded_Object_Sequence<T>::_allocate_buffer (CORBA::ULong length)
this->buffer_ = tmp;
}
-template<class T> void
-TAO_Unbounded_Object_Sequence<T>::_deallocate_buffer (void)
+template<class T,class T_var> void
+TAO_Unbounded_Object_Sequence<T,T_var>::_deallocate_buffer (void)
{
if (this->buffer_ == 0 || this->release_ == 0)
return;
@@ -371,12 +389,12 @@ TAO_Unbounded_Object_Sequence<T>::_deallocate_buffer (void)
CORBA::release (tmp[i]);
tmp[i] = T::_nil ();
}
- TAO_Unbounded_Object_Sequence<T>::freebuf (tmp);
+ TAO_Unbounded_Object_Sequence<T,T_var>::freebuf (tmp);
this->buffer_ = 0;
}
-template<class T> void
-TAO_Unbounded_Object_Sequence<T>::_shrink_buffer (CORBA::ULong nl,
+template<class T,class T_var> void
+TAO_Unbounded_Object_Sequence<T,T_var>::_shrink_buffer (CORBA::ULong nl,
CORBA::ULong ol)
{
T **tmp = ACE_static_cast (T**, this->buffer_);
@@ -388,18 +406,18 @@ TAO_Unbounded_Object_Sequence<T>::_shrink_buffer (CORBA::ULong nl,
}
}
-template <class T> void
-TAO_Unbounded_Object_Sequence<T>::_downcast (void* target,
- CORBA_Object* src,
- CORBA_Environment &env)
+template <class T,class T_var> void
+TAO_Unbounded_Object_Sequence<T,T_var>::_downcast (void* target,
+ CORBA_Object* src,
+ CORBA_Environment &env)
{
T **tmp = ACE_static_cast (T**, target);
*tmp = T::_narrow (src, env);
}
-template <class T> CORBA_Object*
-TAO_Unbounded_Object_Sequence<T>::_upcast (void* src) const
+template <class T,class T_var> CORBA_Object*
+TAO_Unbounded_Object_Sequence<T,T_var>::_upcast (void* src) const
{
T **tmp = ACE_static_cast (T**, src);
@@ -410,30 +428,30 @@ TAO_Unbounded_Object_Sequence<T>::_upcast (void* src) const
// Operations for class TAO_Bounded_Object_Sequence
// *************************************************************
-template <class T, CORBA::ULong MAX>
-TAO_Bounded_Object_Sequence<T, MAX>::
+template <class T, class T_var,CORBA::ULong MAX>
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::
TAO_Bounded_Object_Sequence (void)
: TAO_Bounded_Base_Sequence (MAX,
- TAO_Bounded_Object_Sequence<T, MAX>::allocbuf (MAX))
+ TAO_Bounded_Object_Sequence<T, T_var,MAX>::allocbuf (MAX))
{
}
-template <class T, CORBA::ULong MAX>
-TAO_Bounded_Object_Sequence<T, MAX>::
-TAO_Bounded_Object_Sequence (const TAO_Bounded_Object_Sequence<T, MAX> &rhs)
+template <class T, class T_var,CORBA::ULong MAX>
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::
+TAO_Bounded_Object_Sequence (const TAO_Bounded_Object_Sequence<T, T_var,MAX> &rhs)
: TAO_Bounded_Base_Sequence (rhs)
{
T **tmp1 =
- TAO_Bounded_Object_Sequence<T, MAX>::allocbuf (MAX);
+ TAO_Bounded_Object_Sequence<T, T_var,MAX>::allocbuf (MAX);
T ** const tmp2 = ACE_reinterpret_cast (T** ACE_CAST_CONST, rhs.buffer_);
for (CORBA::ULong i = 0; i < rhs.length_; i++)
tmp1[i] = T::_duplicate (tmp2[i]);
this->buffer_ = tmp1;
}
-template <class T, CORBA::ULong MAX> TAO_Bounded_Object_Sequence<T, MAX>&
-TAO_Bounded_Object_Sequence<T, MAX>::operator=
-(const TAO_Bounded_Object_Sequence<T, MAX> &rhs)
+template <class T, class T_var,CORBA::ULong MAX> TAO_Bounded_Object_Sequence<T, T_var,MAX>&
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::operator=
+(const TAO_Bounded_Object_Sequence<T,T_var, MAX> &rhs)
{
if (this == &rhs)
return *this;
@@ -452,7 +470,7 @@ TAO_Bounded_Object_Sequence<T, MAX>::operator=
}
else
this->buffer_ =
- TAO_Bounded_Object_Sequence<T, MAX>::allocbuf (rhs.maximum_);
+ TAO_Bounded_Object_Sequence<T, T_var,MAX>::allocbuf (rhs.maximum_);
TAO_Bounded_Base_Sequence::operator= (rhs);
@@ -463,8 +481,8 @@ TAO_Bounded_Object_Sequence<T, MAX>::operator=
return *this;
}
-template <class T, CORBA::ULong MAX> T **
-TAO_Bounded_Object_Sequence<T, MAX>::allocbuf (CORBA::ULong)
+template <class T, class T_var,CORBA::ULong MAX> T **
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::allocbuf (CORBA::ULong)
{
T **buf;
@@ -476,8 +494,8 @@ TAO_Bounded_Object_Sequence<T, MAX>::allocbuf (CORBA::ULong)
return buf;
}
-template <class T, CORBA::ULong MAX> void
-TAO_Bounded_Object_Sequence<T, MAX>::freebuf (T **buffer)
+template <class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::freebuf (T **buffer)
{
// How much do we deallocate? Easy! allocbuf() always creates MAX
// elements and initialize them to T::_nil(). So we can be
@@ -492,28 +510,28 @@ TAO_Bounded_Object_Sequence<T, MAX>::freebuf (T **buffer)
delete[] buffer;
}
-template<class T, CORBA::ULong MAX> void
-TAO_Bounded_Object_Sequence<T, MAX>::_allocate_buffer (CORBA::ULong length)
+template<class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::_allocate_buffer (CORBA::ULong length)
{
// For this class memory is never reallocated so the implementation
// is *really* simple.
this->buffer_ =
- TAO_Bounded_Object_Sequence<T, MAX>::allocbuf (length);
+ TAO_Bounded_Object_Sequence<T, T_var,MAX>::allocbuf (length);
}
-template<class T, CORBA::ULong MAX> void
-TAO_Bounded_Object_Sequence<T, MAX>::_deallocate_buffer (void)
+template<class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Object_Sequence<T,T_var,MAX>::_deallocate_buffer (void)
{
if (this->buffer_ == 0 || this->release_ == 0)
return;
T **tmp = ACE_reinterpret_cast (T **, this->buffer_);
- TAO_Bounded_Object_Sequence<T, MAX>::freebuf (tmp);
+ TAO_Bounded_Object_Sequence<T,T_var,MAX>::freebuf (tmp);
this->buffer_ = 0;
}
-template<class T, CORBA::ULong MAX> void
-TAO_Bounded_Object_Sequence<T, MAX>::_shrink_buffer (CORBA::ULong nl,
- CORBA::ULong ol)
+template<class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Object_Sequence<T,T_var, MAX>::_shrink_buffer (CORBA::ULong nl,
+ CORBA::ULong ol)
{
T **tmp = ACE_reinterpret_cast (T **, this->buffer_);
@@ -524,18 +542,18 @@ TAO_Bounded_Object_Sequence<T, MAX>::_shrink_buffer (CORBA::ULong nl,
}
}
-template <class T, CORBA::ULong MAX> void
-TAO_Bounded_Object_Sequence<T, MAX>::_downcast (void* target,
- CORBA_Object* src,
- CORBA_Environment &env)
+template <class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::_downcast (void* target,
+ CORBA_Object* src,
+ CORBA_Environment &env)
{
T **tmp = ACE_static_cast (T**, target);
*tmp = T::_narrow (src, env);
}
-template <class T, CORBA::ULong MAX> CORBA_Object*
-TAO_Bounded_Object_Sequence<T, MAX>::_upcast (void* src) const
+template <class T, class T_var,CORBA::ULong MAX> CORBA_Object*
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::_upcast (void* src) const
{
T **tmp = ACE_static_cast (T**, src);
@@ -547,20 +565,20 @@ TAO_Bounded_Object_Sequence<T, MAX>::_upcast (void* src) const
// *************************************************************
// constructor for unbounded seq
-template <class T>
-TAO_Unbounded_Pseudo_Sequence<T>::
+template <class T,class T_var>
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::
TAO_Unbounded_Pseudo_Sequence (CORBA::ULong maximum)
: TAO_Unbounded_Base_Sequence (maximum,
- TAO_Unbounded_Pseudo_Sequence<T>::allocbuf (maximum))
+ TAO_Unbounded_Pseudo_Sequence<T,T_var>::allocbuf (maximum))
{
}
-template <class T>
-TAO_Unbounded_Pseudo_Sequence<T>::
-TAO_Unbounded_Pseudo_Sequence (const TAO_Unbounded_Pseudo_Sequence<T> &rhs)
+template <class T,class T_var>
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::
+TAO_Unbounded_Pseudo_Sequence (const TAO_Unbounded_Pseudo_Sequence<T,T_var> &rhs)
: TAO_Unbounded_Base_Sequence (rhs)
{
- T **tmp1 = TAO_Unbounded_Pseudo_Sequence<T>::allocbuf (this->maximum_);
+ T **tmp1 = TAO_Unbounded_Pseudo_Sequence<T,T_var>::allocbuf (this->maximum_);
T ** const tmp2 = ACE_reinterpret_cast (T ** ACE_CAST_CONST, rhs.buffer_);
for (CORBA::ULong i = 0; i < rhs.length_; ++i)
@@ -569,16 +587,16 @@ TAO_Unbounded_Pseudo_Sequence (const TAO_Unbounded_Pseudo_Sequence<T> &rhs)
this->buffer_ = tmp1;
}
-template<class T>
-TAO_Unbounded_Pseudo_Sequence<T>::~TAO_Unbounded_Pseudo_Sequence (void)
+template<class T,class T_var>
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::~TAO_Unbounded_Pseudo_Sequence (void)
{
this->_deallocate_buffer ();
}
// assignment operator
-template <class T> TAO_Unbounded_Pseudo_Sequence<T>&
-TAO_Unbounded_Pseudo_Sequence<T>::
-operator= (const TAO_Unbounded_Pseudo_Sequence<T> &rhs)
+template <class T,class T_var> TAO_Unbounded_Pseudo_Sequence<T,T_var>&
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::
+operator= (const TAO_Unbounded_Pseudo_Sequence<T,T_var> &rhs)
{
if (this == &rhs)
return *this;
@@ -595,14 +613,14 @@ operator= (const TAO_Unbounded_Pseudo_Sequence<T> &rhs)
}
if (this->maximum_ < rhs.maximum_)
{
- TAO_Unbounded_Pseudo_Sequence<T>::freebuf (tmp);
+ TAO_Unbounded_Pseudo_Sequence<T,T_var>::freebuf (tmp);
this->buffer_ =
- TAO_Unbounded_Pseudo_Sequence<T>::allocbuf (rhs.maximum_);
+ TAO_Unbounded_Pseudo_Sequence<T,T_var>::allocbuf (rhs.maximum_);
}
}
else
this->buffer_ =
- TAO_Unbounded_Pseudo_Sequence<T>::allocbuf (rhs.maximum_);
+ TAO_Unbounded_Pseudo_Sequence<T,T_var>::allocbuf (rhs.maximum_);
TAO_Unbounded_Base_Sequence::operator= (rhs);
@@ -615,8 +633,8 @@ operator= (const TAO_Unbounded_Pseudo_Sequence<T> &rhs)
return *this;
}
-template <class T> T **
-TAO_Unbounded_Pseudo_Sequence<T>::allocbuf (CORBA::ULong nelems)
+template <class T,class T_var> T **
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::allocbuf (CORBA::ULong nelems)
{
T **buf;
@@ -628,8 +646,8 @@ TAO_Unbounded_Pseudo_Sequence<T>::allocbuf (CORBA::ULong nelems)
return buf;
}
-template <class T> void
-TAO_Unbounded_Pseudo_Sequence<T>::freebuf (T **buffer)
+template <class T,class T_var> void
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::freebuf (T **buffer)
{
if (buffer == 0)
return;
@@ -649,10 +667,10 @@ TAO_Unbounded_Pseudo_Sequence<T>::freebuf (T **buffer)
delete[] buffer;
}
-template<class T> void
-TAO_Unbounded_Pseudo_Sequence<T>::_allocate_buffer (CORBA::ULong length)
+template<class T,class T_var> void
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::_allocate_buffer (CORBA::ULong length)
{
- T **tmp = TAO_Unbounded_Pseudo_Sequence<T>::allocbuf (length);
+ T **tmp = TAO_Unbounded_Pseudo_Sequence<T,T_var>::allocbuf (length);
if (this->buffer_ != 0)
{
@@ -674,8 +692,8 @@ TAO_Unbounded_Pseudo_Sequence<T>::_allocate_buffer (CORBA::ULong length)
this->buffer_ = tmp;
}
-template<class T> void
-TAO_Unbounded_Pseudo_Sequence<T>::_deallocate_buffer (void)
+template<class T,class T_var> void
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::_deallocate_buffer (void)
{
if (this->buffer_ == 0 || this->release_ == 0)
return;
@@ -685,13 +703,13 @@ TAO_Unbounded_Pseudo_Sequence<T>::_deallocate_buffer (void)
CORBA::release (tmp[i]);
tmp[i] = T::_nil ();
}
- TAO_Unbounded_Pseudo_Sequence<T>::freebuf (tmp);
+ TAO_Unbounded_Pseudo_Sequence<T,T_var>::freebuf (tmp);
this->buffer_ = 0;
}
-template<class T> void
-TAO_Unbounded_Pseudo_Sequence<T>::_shrink_buffer (CORBA::ULong nl,
- CORBA::ULong ol)
+template<class T,class T_var> void
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::_shrink_buffer (CORBA::ULong nl,
+ CORBA::ULong ol)
{
T **tmp = ACE_static_cast (T**, this->buffer_);
@@ -706,30 +724,30 @@ TAO_Unbounded_Pseudo_Sequence<T>::_shrink_buffer (CORBA::ULong nl,
// Operations for class TAO_Bounded_Pseudo_Sequence
// *************************************************************
-template <class T, CORBA::ULong MAX>
-TAO_Bounded_Pseudo_Sequence<T, MAX>::
+template <class T, class T_var,CORBA::ULong MAX>
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::
TAO_Bounded_Pseudo_Sequence (void)
: TAO_Bounded_Base_Sequence (MAX,
- TAO_Bounded_Pseudo_Sequence<T, MAX>::allocbuf (MAX))
+ TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::allocbuf (MAX))
{
}
-template <class T, CORBA::ULong MAX>
-TAO_Bounded_Pseudo_Sequence<T, MAX>::
-TAO_Bounded_Pseudo_Sequence (const TAO_Bounded_Pseudo_Sequence<T, MAX> &rhs)
+template <class T, class T_var,CORBA::ULong MAX>
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::
+TAO_Bounded_Pseudo_Sequence (const TAO_Bounded_Pseudo_Sequence<T, T_var,MAX> &rhs)
: TAO_Bounded_Base_Sequence (rhs)
{
T **tmp1 =
- TAO_Bounded_Pseudo_Sequence<T, MAX>::allocbuf (MAX);
+ TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::allocbuf (MAX);
T ** const tmp2 = ACE_reinterpret_cast (T** ACE_CAST_CONST, rhs.buffer_);
for (CORBA::ULong i = 0; i < rhs.length_; i++)
tmp1[i] = T::_duplicate (tmp2[i]);
this->buffer_ = tmp1;
}
-template <class T, CORBA::ULong MAX> TAO_Bounded_Pseudo_Sequence<T, MAX>&
-TAO_Bounded_Pseudo_Sequence<T, MAX>::operator=
-(const TAO_Bounded_Pseudo_Sequence<T, MAX> &rhs)
+template <class T, class T_var,CORBA::ULong MAX> TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>&
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::operator=
+(const TAO_Bounded_Pseudo_Sequence<T, T_var,MAX> &rhs)
{
if (this == &rhs)
return *this;
@@ -759,8 +777,8 @@ TAO_Bounded_Pseudo_Sequence<T, MAX>::operator=
return *this;
}
-template <class T, CORBA::ULong MAX> T **
-TAO_Bounded_Pseudo_Sequence<T, MAX>::allocbuf (CORBA::ULong)
+template <class T, class T_var,CORBA::ULong MAX> T **
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::allocbuf (CORBA::ULong)
{
T **buf;
@@ -772,8 +790,8 @@ TAO_Bounded_Pseudo_Sequence<T, MAX>::allocbuf (CORBA::ULong)
return buf;
}
-template <class T, CORBA::ULong MAX> void
-TAO_Bounded_Pseudo_Sequence<T, MAX>::freebuf (T **buffer)
+template <class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::freebuf (T **buffer)
{
// How much do we deallocate? Easy! allocbuf() always creates MAX
// elements and initialize them to T::_nil(). So we can be
@@ -788,17 +806,17 @@ TAO_Bounded_Pseudo_Sequence<T, MAX>::freebuf (T **buffer)
delete[] buffer;
}
-template<class T, CORBA::ULong MAX> void
-TAO_Bounded_Pseudo_Sequence<T, MAX>::_allocate_buffer (CORBA::ULong length)
+template<class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::_allocate_buffer (CORBA::ULong length)
{
// For this class memory is never reallocated so the implementation
// is *really* simple.
this->buffer_ =
- TAO_Bounded_Pseudo_Sequence<T, MAX>::allocbuf (length);
+ TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::allocbuf (length);
}
-template<class T, CORBA::ULong MAX> void
-TAO_Bounded_Pseudo_Sequence<T, MAX>::_deallocate_buffer (void)
+template<class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::_deallocate_buffer (void)
{
if (this->buffer_ == 0 || this->release_ == 0)
return;
@@ -807,9 +825,9 @@ TAO_Bounded_Pseudo_Sequence<T, MAX>::_deallocate_buffer (void)
this->buffer_ = 0;
}
-template<class T, CORBA::ULong MAX> void
-TAO_Bounded_Pseudo_Sequence<T, MAX>::_shrink_buffer (CORBA::ULong nl,
- CORBA::ULong ol)
+template<class T, class T_var,CORBA::ULong MAX> void
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::_shrink_buffer (CORBA::ULong nl,
+ CORBA::ULong ol)
{
T **tmp = ACE_reinterpret_cast (T **, this->buffer_);
diff --git a/TAO/tao/Sequence_T.h b/TAO/tao/Sequence_T.h
index 427bf186584..7516f6581e3 100644
--- a/TAO/tao/Sequence_T.h
+++ b/TAO/tao/Sequence_T.h
@@ -214,13 +214,13 @@ public:
// *************************************************************
-template<class T> class TAO_Unbounded_Object_Sequence;
-template<class T, CORBA::ULong MAX> class TAO_Bounded_Object_Sequence;
+template<class T,class T_var> class TAO_Unbounded_Object_Sequence;
+template<class T, class T_var, CORBA::ULong MAX> class TAO_Bounded_Object_Sequence;
template<CORBA::ULong MAX> class TAO_Bounded_String_Sequence;
// *************************************************************
-template<class T>
+template<class T,class T_var>
class TAO_Object_Manager
{
// = TITLE
@@ -250,7 +250,7 @@ class TAO_Object_Manager
// says that T_ptr *could* map to a type different to T* in the
// particular case of TAO it does map to <T*>.
//
- friend class TAO_Unbounded_Object_Sequence<T>;
+ friend class TAO_Unbounded_Object_Sequence<T,T_var>;
public:
// @@ Use partial template specialization here to give access only
// to the right kind of sequence.
@@ -258,7 +258,7 @@ public:
// class TAO_Bounded_Object_Sequence<T,MAX>;
// = Initialization and termination methods.
- TAO_Object_Manager (const TAO_Object_Manager<T> &rhs);
+ TAO_Object_Manager (const TAO_Object_Manager<T,T_var> &rhs);
// Copy constructor, the semantics are non-trivial:
// + The referenced element is duplicated or not according to the
// release value on the <rhs>.
@@ -272,13 +272,16 @@ public:
~TAO_Object_Manager (void);
// Destructor, only releases the object if <release_> is true.
- TAO_Object_Manager<T> &operator= (const TAO_Object_Manager<T> &rhs);
+ TAO_Object_Manager<T,T_var> &operator= (const TAO_Object_Manager<T,T_var> &rhs);
// Assignment from another managed type, only release if
// <this->release_> is true.
// @@ TODO what happens if rhs.release_ is true an this->relase_ is
// false?
- TAO_Object_Manager<T> &operator= (T *);
+ TAO_Object_Manager<T,T_var> &operator= (T *);
+ // Assignment from T *.
+
+ TAO_Object_Manager<T,T_var> &operator= (T_var);
// Assignment from T *.
T * operator-> (void) const;
@@ -313,7 +316,7 @@ private:
// *************************************************************
-template<class T>
+template<class T,class T_var>
class TAO_Unbounded_Object_Sequence : public TAO_Unbounded_Base_Sequence
{
// = TITLE
@@ -368,7 +371,7 @@ public:
// using the sequence allocbuf function, and the sequence will pass
// it to freebuf when finished with it.
- TAO_Unbounded_Object_Sequence(const TAO_Unbounded_Object_Sequence<T> &);
+ TAO_Unbounded_Object_Sequence(const TAO_Unbounded_Object_Sequence<T,T_var> &);
// The copy constructor performs a deep copy from the existing
// structure to create a new structure, including calling _duplicate
// on all object reference members and performing the necessary
@@ -383,7 +386,7 @@ public:
// The destructor releases all object reference memebrs and frees
// all string members.
- TAO_Unbounded_Object_Sequence<T> &operator= (const TAO_Unbounded_Object_Sequence <T> &);
+ TAO_Unbounded_Object_Sequence<T,T_var> &operator= (const TAO_Unbounded_Object_Sequence <T,T_var> &);
// The assignment operator first releases all object reference
// members and frees all string members, and then performs a
// deepcopy to create a new structure.
@@ -401,7 +404,7 @@ public:
// the reallocation is performed. After reallocation, the release
// flag is always set to TRUE.
- TAO_Object_Manager<T> operator[] (CORBA::ULong slot) const;
+ TAO_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
// read-write accessor
static T **allocbuf (CORBA::ULong);
@@ -438,7 +441,7 @@ public:
// *************************************************************
-template<class T, CORBA::ULong MAX>
+template<class T, class T_var,CORBA::ULong MAX>
class TAO_Bounded_Object_Sequence : public TAO_Bounded_Base_Sequence
{
// = TITLE
@@ -462,16 +465,16 @@ public:
CORBA::Boolean release=0);
// Constructor from data.
- TAO_Bounded_Object_Sequence (const TAO_Bounded_Object_Sequence<T,MAX> &);
+ TAO_Bounded_Object_Sequence (const TAO_Bounded_Object_Sequence<T,T_var,MAX> &);
// Copy constructor.
~TAO_Bounded_Object_Sequence (void);
// destructor
- TAO_Bounded_Object_Sequence &operator= (const TAO_Bounded_Object_Sequence<T,MAX> &);
+ TAO_Bounded_Object_Sequence &operator= (const TAO_Bounded_Object_Sequence<T,T_var,MAX> &);
// Assignment from another Bounded sequence.
- TAO_Object_Manager<T> operator[] (CORBA::ULong slot) const;
+ TAO_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
// Read-write accessor.
static T **allocbuf (CORBA::ULong length);
@@ -497,7 +500,7 @@ public:
// *************************************************************
-template<class T>
+template<class T,class T_var>
class TAO_Unbounded_Pseudo_Sequence : public TAO_Unbounded_Base_Sequence
{
// = TITLE
@@ -526,18 +529,18 @@ public:
CORBA::Boolean release=0);
// Constructor with a given buffer.
- TAO_Unbounded_Pseudo_Sequence(const TAO_Unbounded_Pseudo_Sequence<T> &);
+ TAO_Unbounded_Pseudo_Sequence(const TAO_Unbounded_Pseudo_Sequence<T,T_var> &);
// Copy ctor, deep copies.
~TAO_Unbounded_Pseudo_Sequence (void);
// dtor releases all the contained elements.
- TAO_Unbounded_Pseudo_Sequence<T> &operator= (const TAO_Unbounded_Pseudo_Sequence <T> &);
+ TAO_Unbounded_Pseudo_Sequence<T,T_var> &operator= (const TAO_Unbounded_Pseudo_Sequence <T,T_var> &);
// The assignment operator first releases all object reference
// members and frees all string members, and then performs a
// deepcopy to create a new structure.
- TAO_Object_Manager<T> operator[] (CORBA::ULong slot) const;
+ TAO_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
// read-write accessor
static T **allocbuf (CORBA::ULong);
@@ -556,7 +559,7 @@ public:
// *************************************************************
-template<class T, CORBA::ULong MAX>
+template<class T, class T_var,CORBA::ULong MAX>
class TAO_Bounded_Pseudo_Sequence : public TAO_Bounded_Base_Sequence
{
// = TITLE
@@ -576,16 +579,16 @@ public:
CORBA::Boolean release=0);
// Constructor from data.
- TAO_Bounded_Pseudo_Sequence (const TAO_Bounded_Pseudo_Sequence<T,MAX> &);
+ TAO_Bounded_Pseudo_Sequence (const TAO_Bounded_Pseudo_Sequence<T,T_var,MAX> &);
// Copy constructor.
~TAO_Bounded_Pseudo_Sequence (void);
// destructor
- TAO_Bounded_Pseudo_Sequence &operator= (const TAO_Bounded_Pseudo_Sequence<T,MAX> &);
+ TAO_Bounded_Pseudo_Sequence &operator= (const TAO_Bounded_Pseudo_Sequence<T,T_var,MAX> &);
// Assignment from another Bounded sequence.
- TAO_Object_Manager<T> operator[] (CORBA::ULong slot) const;
+ TAO_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
// Read-write accessor.
static T **allocbuf (CORBA::ULong length);
diff --git a/TAO/tao/Sequence_T.i b/TAO/tao/Sequence_T.i
index c32f03bb038..005c9e161ec 100644
--- a/TAO/tao/Sequence_T.i
+++ b/TAO/tao/Sequence_T.i
@@ -209,65 +209,65 @@ TAO_Bounded_Sequence<T, MAX>::operator[] (CORBA::ULong i) const
// Inline operations for class TAO_Object_Manager<T>
// *************************************************************
-template <class T> ACE_INLINE
-TAO_Object_Manager<T>::~TAO_Object_Manager (void)
+template <class T,class T_var> ACE_INLINE
+TAO_Object_Manager<T,T_var>::~TAO_Object_Manager (void)
{
}
-template <class T> ACE_INLINE
-TAO_Object_Manager<T>::TAO_Object_Manager (const TAO_Object_Manager<T> &rhs)
+template <class T,class T_var> ACE_INLINE
+TAO_Object_Manager<T,T_var>::TAO_Object_Manager (const TAO_Object_Manager<T,T_var> &rhs)
: ptr_ (rhs.ptr_),
release_ (rhs.release_)
{
}
-template <class T> ACE_INLINE
-TAO_Object_Manager<T>::TAO_Object_Manager(T** buffer, CORBA::Boolean release)
+template <class T,class T_var> ACE_INLINE
+TAO_Object_Manager<T,T_var>::TAO_Object_Manager(T** buffer, CORBA::Boolean release)
: ptr_ (buffer),
release_ (release)
{
}
-template <class T> ACE_INLINE T *
-TAO_Object_Manager<T>::operator-> (void) const
+template <class T,class T_var> ACE_INLINE T *
+TAO_Object_Manager<T,T_var>::operator-> (void) const
{
return *this->ptr_;
}
-template <class T> ACE_INLINE
-TAO_Object_Manager<T>::operator const T* () const // cast
+template <class T,class T_var> ACE_INLINE
+TAO_Object_Manager<T,T_var>::operator const T* () const // cast
{
return *this->ptr_;
}
-template <class T> ACE_INLINE
-TAO_Object_Manager<T>::operator T* &() // cast
+template <class T,class T_var> ACE_INLINE
+TAO_Object_Manager<T,T_var>::operator T* &() // cast
{
return *this->ptr_;
}
-template <class T> ACE_INLINE T *
-TAO_Object_Manager<T>::in (void) const
+template <class T,class T_var> ACE_INLINE T *
+TAO_Object_Manager<T,T_var>::in (void) const
{
return *this->ptr_;
}
-template <class T> ACE_INLINE T *&
-TAO_Object_Manager<T>::inout (void)
+template <class T,class T_var> ACE_INLINE T *&
+TAO_Object_Manager<T,T_var>::inout (void)
{
return *this->ptr_;
}
-template <class T> ACE_INLINE T *&
-TAO_Object_Manager<T>::out (void)
+template <class T,class T_var> ACE_INLINE T *&
+TAO_Object_Manager<T,T_var>::out (void)
{
CORBA::release (*this->ptr_);
*this->ptr_ = T::_nil ();
return *this->ptr_;
}
-template <class T> ACE_INLINE T *
-TAO_Object_Manager<T>::_retn (void)
+template <class T,class T_var> ACE_INLINE T *
+TAO_Object_Manager<T,T_var>::_retn (void)
{
T *temp = *this->ptr_;
*this->ptr_ = T::_nil ();
@@ -279,13 +279,13 @@ TAO_Object_Manager<T>::_retn (void)
// *************************************************************
//default constructor
-template <class T> ACE_INLINE
-TAO_Unbounded_Object_Sequence<T>::TAO_Unbounded_Object_Sequence (void)
+template <class T,class T_var> ACE_INLINE
+TAO_Unbounded_Object_Sequence<T,T_var>::TAO_Unbounded_Object_Sequence (void)
{
}
-template <class T> ACE_INLINE
-TAO_Unbounded_Object_Sequence<T>::
+template <class T,class T_var> ACE_INLINE
+TAO_Unbounded_Object_Sequence<T,T_var>::
TAO_Unbounded_Object_Sequence (CORBA::ULong maximum,
CORBA::ULong length,
T* *value,
@@ -294,26 +294,26 @@ TAO_Unbounded_Object_Sequence (CORBA::ULong maximum,
{
}
-template <class T> ACE_INLINE TAO_Object_Manager<T>
-TAO_Unbounded_Object_Sequence<T>::operator[] (CORBA::ULong slot) const
+template <class T,class T_var> ACE_INLINE TAO_Object_Manager<T,T_var>
+TAO_Unbounded_Object_Sequence<T,T_var>::operator[] (CORBA::ULong slot) const
{
ACE_ASSERT (slot < this->maximum_);
T ** const tmp = ACE_reinterpret_cast (T ** ACE_CAST_CONST, this->buffer_);
- return TAO_Object_Manager<T> (tmp + slot, this->release_);
+ return TAO_Object_Manager<T,T_var> (tmp + slot, this->release_);
}
// *************************************************************
// class TAO_Bounded_Object_Sequence
// *************************************************************
-template<class T, CORBA::ULong MAX> ACE_INLINE
-TAO_Bounded_Object_Sequence<T,MAX>::~TAO_Bounded_Object_Sequence (void)
+template<class T, class T_var,CORBA::ULong MAX> ACE_INLINE
+TAO_Bounded_Object_Sequence<T,T_var,MAX>::~TAO_Bounded_Object_Sequence (void)
{
this->_deallocate_buffer ();
}
-template <class T, CORBA::ULong MAX> ACE_INLINE
-TAO_Bounded_Object_Sequence<T,MAX>::
+template <class T, class T_var,CORBA::ULong MAX> ACE_INLINE
+TAO_Bounded_Object_Sequence<T,T_var,MAX>::
TAO_Bounded_Object_Sequence (CORBA::ULong length,
T **value,
CORBA::Boolean release)
@@ -321,12 +321,12 @@ TAO_Bounded_Object_Sequence (CORBA::ULong length,
{
}
-template <class T, CORBA::ULong MAX> ACE_INLINE TAO_Object_Manager<T>
-TAO_Bounded_Object_Sequence<T, MAX>::operator[] (CORBA::ULong slot) const
+template <class T, class T_var,CORBA::ULong MAX> ACE_INLINE TAO_Object_Manager<T,T_var>
+TAO_Bounded_Object_Sequence<T, T_var,MAX>::operator[] (CORBA::ULong slot) const
{
ACE_ASSERT (slot < this->maximum_);
T **const tmp = ACE_reinterpret_cast (T ** ACE_CAST_CONST, this->buffer_);
- return TAO_Object_Manager<T> (tmp + slot, this->release_);
+ return TAO_Object_Manager<T,T_var> (tmp + slot, this->release_);
}
// *************************************************************
@@ -334,13 +334,13 @@ TAO_Bounded_Object_Sequence<T, MAX>::operator[] (CORBA::ULong slot) const
// *************************************************************
//default constructor
-template <class T> ACE_INLINE
-TAO_Unbounded_Pseudo_Sequence<T>::TAO_Unbounded_Pseudo_Sequence (void)
+template <class T,class T_var> ACE_INLINE
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::TAO_Unbounded_Pseudo_Sequence (void)
{
}
-template <class T> ACE_INLINE
-TAO_Unbounded_Pseudo_Sequence<T>::
+template <class T,class T_var> ACE_INLINE
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::
TAO_Unbounded_Pseudo_Sequence (CORBA::ULong maximum,
CORBA::ULong length,
T* *value,
@@ -349,26 +349,26 @@ TAO_Unbounded_Pseudo_Sequence (CORBA::ULong maximum,
{
}
-template <class T> ACE_INLINE TAO_Object_Manager<T>
-TAO_Unbounded_Pseudo_Sequence<T>::operator[] (CORBA::ULong slot) const
+template <class T,class T_var> ACE_INLINE TAO_Object_Manager<T,T_var>
+TAO_Unbounded_Pseudo_Sequence<T,T_var>::operator[] (CORBA::ULong slot) const
{
ACE_ASSERT (slot < this->maximum_);
T ** const tmp = ACE_reinterpret_cast (T ** ACE_CAST_CONST, this->buffer_);
- return TAO_Object_Manager<T> (tmp + slot, this->release_);
+ return TAO_Object_Manager<T,T_var> (tmp + slot, this->release_);
}
// *************************************************************
// class TAO_Bounded_Pseudo_Sequence
// *************************************************************
-template<class T, CORBA::ULong MAX> ACE_INLINE
-TAO_Bounded_Pseudo_Sequence<T,MAX>::~TAO_Bounded_Pseudo_Sequence (void)
+template<class T, class T_var,CORBA::ULong MAX> ACE_INLINE
+TAO_Bounded_Pseudo_Sequence<T,T_var,MAX>::~TAO_Bounded_Pseudo_Sequence (void)
{
this->_deallocate_buffer ();
}
-template <class T, CORBA::ULong MAX> ACE_INLINE
-TAO_Bounded_Pseudo_Sequence<T,MAX>::
+template <class T, class T_var,CORBA::ULong MAX> ACE_INLINE
+TAO_Bounded_Pseudo_Sequence<T,T_var,MAX>::
TAO_Bounded_Pseudo_Sequence (CORBA::ULong length,
T **value,
CORBA::Boolean release)
@@ -376,8 +376,8 @@ TAO_Bounded_Pseudo_Sequence (CORBA::ULong length,
{
}
-template <class T, CORBA::ULong MAX> ACE_INLINE TAO_Object_Manager<T>
-TAO_Bounded_Pseudo_Sequence<T, MAX>::operator[] (CORBA::ULong slot) const
+template <class T, class T_var,CORBA::ULong MAX> ACE_INLINE TAO_Object_Manager<T,T_var>
+TAO_Bounded_Pseudo_Sequence<T, T_var,MAX>::operator[] (CORBA::ULong slot) const
{
ACE_ASSERT (slot < this->maximum_);
T **const tmp = ACE_reinterpret_cast (T ** ACE_CAST_CONST, this->buffer_);
diff --git a/TAO/tao/corbafwd.h b/TAO/tao/corbafwd.h
index aa942019e79..1d3be47cddd 100644
--- a/TAO/tao/corbafwd.h
+++ b/TAO/tao/corbafwd.h
@@ -348,7 +348,7 @@ typedef void (*TAO_Skeleton)(
// forward declare sequences.
template <class T> class TAO_Unbounded_Sequence;
-template <class T> class TAO_Unbounded_Object_Sequence;
+template <class T,class T_var> class TAO_Unbounded_Object_Sequence;
// Provide a simple function to access the TSS default environment.
// We tried with CORBA_Environment::default_environment (),