diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-04-22 14:11:21 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-04-22 14:11:21 +0000 |
commit | 28fd8d467ab53d7a5972b771ce1c6349c8ed719e (patch) | |
tree | d74d457472a96f178087091f43fa1d0ba5444f05 | |
parent | 724275f7d854c72370c0f8a34479434b315b282f (diff) | |
download | ATCD-28fd8d467ab53d7a5972b771ce1c6349c8ed719e.tar.gz |
ChangeLogTag:Tue Apr 22 09:10:23 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog_ref | 4 | ||||
-rw-r--r-- | TAO/tao/Seq_VarOut_T.cpp | 159 | ||||
-rw-r--r-- | TAO/tao/Seq_VarOut_T.h | 180 | ||||
-rw-r--r-- | TAO/tao/Seq_VarOut_T.inl | 319 | ||||
-rw-r--r-- | TAO/tao/Seq_Var_T.cpp | 2 |
5 files changed, 5 insertions, 659 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref index ca40c172c00..5f7a644be46 100644 --- a/TAO/ChangeLog_ref +++ b/TAO/ChangeLog_ref @@ -1,3 +1,7 @@ +Tue Apr 22 09:10:23 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * tao/Seq_Var_T.cpp: Fixed a wroong inclusion of inlined file. + Tue Apr 22 06:30:52 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> * be/be_visitor_sequence/sequence_ch.cpp: diff --git a/TAO/tao/Seq_VarOut_T.cpp b/TAO/tao/Seq_VarOut_T.cpp deleted file mode 100644 index 412b12aa0a3..00000000000 --- a/TAO/tao/Seq_VarOut_T.cpp +++ /dev/null @@ -1,159 +0,0 @@ -// $Id$ - -#ifndef TAO_SEQ_VAROUT_T_C -#define TAO_SEQ_VAROUT_T_C - -#include "tao/Seq_VarOut_T.h" - -#if !defined (__ACE_INLINE__) -#include "tao/Seq_VarOut_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID (tao, - Seq_VarOut_T, - "$Id$") - -template<typename T, typename T_elem> -TAO_Seq_Var_Base_T<T,T_elem>::TAO_Seq_Var_Base_T ( - const TAO_Seq_Var_Base_T<T,T_elem> & p - ) -{ - if (p.ptr_) - { - ACE_NEW (this->ptr_, - T (*p.ptr_)); - } - else - { - this->ptr_ = 0; - } -} - -// **************************************************************************** - -template<typename T, typename T_elem> -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) - { - 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; -} - -// Fixed-size types only. -template<typename T, typename T_elem> -TAO_FixedSeq_Var_T<T,T_elem> & -TAO_FixedSeq_Var_T<T,T_elem>::operator= (const T & p) -{ - if (this->ptr_ != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, - T (p), - *this); - } - - 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 */ diff --git a/TAO/tao/Seq_VarOut_T.h b/TAO/tao/Seq_VarOut_T.h deleted file mode 100644 index 32baf4bbc8c..00000000000 --- a/TAO/tao/Seq_VarOut_T.h +++ /dev/null @@ -1,180 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Seq_VarOut_T.h - * - * $Id$ - * - * @author Jeff Parsons - */ -//============================================================================= - - -#ifndef TAO_SEQ_VAROUT_T_H -#define TAO_SEQ_VAROUT_T_H - -#include "ace/pre.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/** - * @class TAO_Seq_Var_Base_T - * - * @brief Parametrized implementation of _var base class for sequences - * - */ -template <typename T, typename T_elem> -class TAO_Seq_Var_Base_T -{ -public: - TAO_Seq_Var_Base_T (void); - TAO_Seq_Var_Base_T (T *); - TAO_Seq_Var_Base_T (const TAO_Seq_Var_Base_T<T,T_elem> &); - - ~TAO_Seq_Var_Base_T (void); - - T *operator-> (void); - const T *operator-> (void) const; - - operator const T &() const; - operator T &(); - operator T &() const; - - // in, inout, out, _retn - const T & in (void) const; - T & inout (void); - T *& out (void); - T * _retn (void); - - // TAO extension. - T * ptr (void) const; - -protected: - T * ptr_; -}; - -/** - * @class TAO_FixedSeq_Var_T - * - * @brief Parametrized implementation of _var class for sequences - * whose element is of fixed size.. - * - */ -template <typename T, typename T_elem> -class TAO_FixedSeq_Var_T : public TAO_Seq_Var_Base_T<T,T_elem> -{ -public: - TAO_FixedSeq_Var_T (void); - TAO_FixedSeq_Var_T (T *); - TAO_FixedSeq_Var_T (const TAO_FixedSeq_Var_T<T,T_elem> &); - - // Fixed-size base types only. - TAO_FixedSeq_Var_T (const T &); - - TAO_FixedSeq_Var_T & operator= (T *); - TAO_FixedSeq_Var_T & operator= (const TAO_FixedSeq_Var_T<T,T_elem> &); - - T_elem & operator[] (CORBA::ULong index); - - // Fixed-size base types only. - TAO_FixedSeq_Var_T & operator= (const T &); -}; - -/** - * @class TAO_VarSeq_Var_T - * - * @brief Parametrized implementation of _var class for sequences - * whose element is of variable size.. - * - */ -template <typename T, typename T_elem> -class TAO_VarSeq_Var_T : public TAO_Seq_Var_Base_T<T,T_elem> -{ -public: - TAO_VarSeq_Var_T (void); - TAO_VarSeq_Var_T (T *); - TAO_VarSeq_Var_T (const TAO_VarSeq_Var_T<T,T_elem> &); - - TAO_VarSeq_Var_T & operator= (T *); - TAO_VarSeq_Var_T & operator= (const TAO_VarSeq_Var_T<T,T_elem> &); - - T_elem & operator[] (CORBA::ULong index); - - // Variable-size base types only. - operator T *& (); -}; - -/** - * @class TAO_MngSeq_Var_T - * - * @brief Parametrized implementation of _var class for sequences - * whose element is of a managed type - string, wstring, valuetype, - * interface, abstract interface and pseudo object. - * - */ -template <typename T, typename T_elem> -class TAO_MngSeq_Var_T : public TAO_Seq_Var_Base_T<T,T_elem> -{ -public: - TAO_MngSeq_Var_T (void); - TAO_MngSeq_Var_T (T *); - TAO_MngSeq_Var_T (const TAO_MngSeq_Var_T<T,T_elem> &); - - TAO_MngSeq_Var_T & operator= (T *); - TAO_MngSeq_Var_T & operator= (const TAO_MngSeq_Var_T<T,T_elem> &); - - // Variable-size base types only. - operator T *& (); - - // Managed base types only. - T_elem operator[] (CORBA::ULong index); -}; - -/** - * @class TAO_Seq_Out_T - * - * @brief Parametrized implementation of _out class for sequences. - * - */ -template <typename T, typename T_var, typename T_elem> -class TAO_Seq_Out_T -{ -public: - TAO_Seq_Out_T (T *&); - TAO_Seq_Out_T (T_var &); - TAO_Seq_Out_T (const TAO_Seq_Out_T<T,T_var,T_elem> &); - - TAO_Seq_Out_T &operator= (const TAO_Seq_Out_T<T,T_var,T_elem> &); - TAO_Seq_Out_T &operator= (T *); - - operator T *& (); - T *& ptr (void); - T * operator-> (void); - - T_elem & operator[] (CORBA::ULong index); - -private: - typedef TAO_Seq_Out_T<T,T_var,T_elem> THIS_OUT_TYPE; - T *& ptr_; - // Assignment from T_var not allowed. - void operator= (const T_var &); -}; - -#if defined (__ACE_INLINE__) -#include "Seq_VarOut_T.inl" -#endif /* defined INLINE */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "tao/Seq_VarOut_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Seq_VarOut_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include "ace/post.h" - -#endif /* TAO_SEQ_VAROUT_T_H */ diff --git a/TAO/tao/Seq_VarOut_T.inl b/TAO/tao/Seq_VarOut_T.inl deleted file mode 100644 index a67dd51fcce..00000000000 --- a/TAO/tao/Seq_VarOut_T.inl +++ /dev/null @@ -1,319 +0,0 @@ -//$Id$ - -template<typename T, typename T_elem> -ACE_INLINE -TAO_Seq_Var_Base_T<T,T_elem>::TAO_Seq_Var_Base_T (void) - : ptr_ (0) -{} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_Seq_Var_Base_T<T,T_elem>::TAO_Seq_Var_Base_T (T * p) - : ptr_ (p) -{} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_Seq_Var_Base_T<T,T_elem>::~TAO_Seq_Var_Base_T (void) -{ - delete this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -const T * -TAO_Seq_Var_Base_T<T,T_elem>::operator-> (void) const -{ - return this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -T * -TAO_Seq_Var_Base_T<T,T_elem>::operator-> (void) -{ - return this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_Seq_Var_Base_T<T,T_elem>::operator const T & () const -{ - return *this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_Seq_Var_Base_T<T,T_elem>::operator T & () -{ - return *this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_Seq_Var_Base_T<T,T_elem>::operator T & () const -{ - return *this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -const T & -TAO_Seq_Var_Base_T<T,T_elem>::in (void) const -{ - return *this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -T & -TAO_Seq_Var_Base_T<T,T_elem>::inout (void) -{ - return *this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -T *& -TAO_Seq_Var_Base_T<T,T_elem>::out (void) -{ - delete this->ptr_; - this->ptr_ = 0; - return this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -T * -TAO_Seq_Var_Base_T<T,T_elem>::_retn (void) -{ - T * tmp = this->ptr_; - this->ptr_ = 0; - return tmp; -} - -template<typename T, typename T_elem> -ACE_INLINE -T * -TAO_Seq_Var_Base_T<T,T_elem>::ptr (void) const -{ - return this->ptr_; -} - -// *************************************************************** - -template<typename T, typename T_elem> -ACE_INLINE -TAO_FixedSeq_Var_T<T,T_elem>::TAO_FixedSeq_Var_T (void) -{} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_FixedSeq_Var_T<T,T_elem>::TAO_FixedSeq_Var_T (T * p) - : TAO_Seq_Var_Base_T<T,T_elem> (p) -{} - -template<typename T, typename T_elem> -TAO_FixedSeq_Var_T<T,T_elem>::TAO_FixedSeq_Var_T ( - const TAO_FixedSeq_Var_T<T,T_elem> & p - ) - : TAO_Seq_Var_Base_T<T,T_elem> (p) -{ -} - -// Fixed-size base types only. -template<typename T, typename T_elem> -ACE_INLINE -TAO_FixedSeq_Var_T<T,T_elem>::TAO_FixedSeq_Var_T (const T & p) -{ - ACE_NEW (this->ptr_, - T (p)); -} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_FixedSeq_Var_T<T,T_elem> & -TAO_FixedSeq_Var_T<T,T_elem>::operator= (T * p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -template<typename T, typename T_elem> -ACE_INLINE -T_elem & -TAO_FixedSeq_Var_T<T,T_elem>::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -// *************************************************************** - -template<typename T, typename T_elem> -ACE_INLINE -TAO_VarSeq_Var_T<T,T_elem>::TAO_VarSeq_Var_T (void) -{} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_VarSeq_Var_T<T,T_elem>::TAO_VarSeq_Var_T (T * p) - : TAO_Seq_Var_Base_T<T,T_elem> (p) -{} - -template<typename T, typename T_elem> -TAO_VarSeq_Var_T<T,T_elem>::TAO_VarSeq_Var_T ( - const TAO_VarSeq_Var_T<T,T_elem> & p - ) - : TAO_Seq_Var_Base_T<T,T_elem> (p) -{} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_VarSeq_Var_T<T,T_elem> & -TAO_VarSeq_Var_T<T,T_elem>::operator= (T * p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -// Variable-size types only. -template<typename T, typename T_elem> -ACE_INLINE -TAO_VarSeq_Var_T<T,T_elem>::operator T *& () -{ - return this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -T_elem & -TAO_VarSeq_Var_T<T,T_elem>::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -// *************************************************************** - -template<typename T, typename T_elem> -ACE_INLINE -TAO_MngSeq_Var_T<T,T_elem>::TAO_MngSeq_Var_T (void) -{} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_MngSeq_Var_T<T,T_elem>::TAO_MngSeq_Var_T (T * p) - : TAO_Seq_Var_Base_T<T,T_elem> (p) -{} - -template<typename T, typename T_elem> -TAO_MngSeq_Var_T<T,T_elem>::TAO_MngSeq_Var_T ( - const TAO_MngSeq_Var_T<T,T_elem> & p - ) - : TAO_Seq_Var_Base_T<T,T_elem> (p) -{} - -template<typename T, typename T_elem> -ACE_INLINE -TAO_MngSeq_Var_T<T,T_elem> & -TAO_MngSeq_Var_T<T,T_elem>::operator= (T * p) -{ - delete this->ptr_; - this->ptr_ = p; - return *this; -} - -// Variable-size types only. -template<typename T, typename T_elem> -ACE_INLINE -TAO_MngSeq_Var_T<T,T_elem>::operator T *& () -{ - return this->ptr_; -} - -template<typename T, typename T_elem> -ACE_INLINE -T_elem -TAO_MngSeq_Var_T<T,T_elem>::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} - -// **************************************************************** - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -TAO_Seq_Out_T<T,T_var,T_elem>::TAO_Seq_Out_T (T *& p) - : ptr_ (p) -{ - this->ptr_ = 0; -} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -TAO_Seq_Out_T<T,T_var,T_elem>::TAO_Seq_Out_T (T_var & p) - : ptr_ (p.out ()) -{ - delete this->ptr_; - this->ptr_ = 0; -} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -TAO_Seq_Out_T<T,T_var,T_elem>::TAO_Seq_Out_T ( - const TAO_Seq_Out_T<T,T_var,T_elem> & p - ) - : ptr_ (ACE_const_cast (THIS_OUT_TYPE &, p).ptr_) -{} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -TAO_Seq_Out_T<T,T_var,T_elem> & -TAO_Seq_Out_T<T,T_var,T_elem>::operator= ( - const TAO_Seq_Out_T<T,T_var,T_elem> & p - ) -{ - this->ptr_ = ACE_const_cast (THIS_OUT_TYPE &, p).ptr_; - return *this; -} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -TAO_Seq_Out_T<T,T_var,T_elem> & -TAO_Seq_Out_T<T,T_var,T_elem>::operator= (T * p) -{ - this->ptr_ = p; - return *this; -} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -TAO_Seq_Out_T<T,T_var,T_elem>::operator T *& () -{ - return this->ptr_; -} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -T *& -TAO_Seq_Out_T<T,T_var,T_elem>::ptr (void) -{ - return this->ptr_; -} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -T * -TAO_Seq_Out_T<T,T_var,T_elem>::operator-> (void) -{ - return this->ptr_; -} - -template<typename T, typename T_var, typename T_elem> -ACE_INLINE -T_elem & -TAO_Seq_Out_T<T,T_var,T_elem>::operator[] (CORBA::ULong index) -{ - return this->ptr_->operator[] (index); -} diff --git a/TAO/tao/Seq_Var_T.cpp b/TAO/tao/Seq_Var_T.cpp index 6cb7798e88e..a566fc7a436 100644 --- a/TAO/tao/Seq_Var_T.cpp +++ b/TAO/tao/Seq_Var_T.cpp @@ -6,7 +6,7 @@ #include "tao/Seq_Var_T.h" #if !defined (__ACE_INLINE__) -#include "tao/Seq_VarOut_T.inl" +#include "tao/Seq_Var_T.inl" #endif /* __ACE_INLINE__ */ ACE_RCSID (tao, |