diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-03-12 21:42:05 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2007-03-12 21:42:05 +0000 |
commit | ba5b5451875d159879d79b993808d6889ced81ef (patch) | |
tree | d91ca0948bf9978177d0c892fea93cdb207568a6 | |
parent | 0542c1752da9cece063fd6687eee3d8bf74b8cbe (diff) | |
download | ATCD-ba5b5451875d159879d79b993808d6889ced81ef.tar.gz |
ChangeLogTag:Mon Mar 12 22:29:32 UTC 2007 Ossama Othman <ossama_othman at symantec dot com>
-rw-r--r-- | TAO/tao/Generic_Sequence_T.h | 8 | ||||
-rw-r--r-- | TAO/tao/Makefile.am | 1 | ||||
-rw-r--r-- | TAO/tao/Object_Reference_Traits_T.h | 10 | ||||
-rw-r--r-- | TAO/tao/String_Traits_T.h | 10 | ||||
-rw-r--r-- | TAO/tao/Unbounded_Octet_Sequence_T.h | 6 | ||||
-rwxr-xr-x | TAO/tao/checked_iterator.h | 37 | ||||
-rw-r--r-- | TAO/tao/tao.mpc | 1 |
7 files changed, 26 insertions, 47 deletions
diff --git a/TAO/tao/Generic_Sequence_T.h b/TAO/tao/Generic_Sequence_T.h index 19f4f71b900..50a7819434a 100644 --- a/TAO/tao/Generic_Sequence_T.h +++ b/TAO/tao/Generic_Sequence_T.h @@ -57,7 +57,7 @@ */ #include "tao/Range_Checking_T.h" -#include "tao/checked_iterator.h" +#include "ace/checked_iterator.h" #include <algorithm> @@ -121,8 +121,7 @@ public: element_traits::copy_range( rhs.buffer_, rhs.buffer_ + rhs.length_, - tmp.buffer_); -/* TAO_checked_array_iterator (tmp.buffer_, tmp.length_)); */ + ACE_make_checked_array_iterator (tmp.buffer_, tmp.length_)); swap(tmp); } @@ -187,8 +186,7 @@ public: element_traits::copy_range( buffer_, buffer_ + length_, - tmp.buffer_); -/* TAO_checked_array_iterator (tmp.buffer_, tmp.length_)); */ + ACE_make_checked_array_iterator (tmp.buffer_, tmp.length_)); element_traits::initialize_range( tmp.buffer_ + length_, tmp.buffer_ + length); diff --git a/TAO/tao/Makefile.am b/TAO/tao/Makefile.am index e9ef2cfad2b..94021756257 100644 --- a/TAO/tao/Makefile.am +++ b/TAO/tao/Makefile.am @@ -1472,7 +1472,6 @@ nobase_include_HEADERS = \ WrongTransaction.pidl \ WrongTransactionC.h \ WrongTransactionS.h \ - checked_iterator.h \ corba.h \ corbafwd.h \ debug.h \ diff --git a/TAO/tao/Object_Reference_Traits_T.h b/TAO/tao/Object_Reference_Traits_T.h index 004c191fe28..1ca1c412a67 100644 --- a/TAO/tao/Object_Reference_Traits_T.h +++ b/TAO/tao/Object_Reference_Traits_T.h @@ -42,11 +42,21 @@ struct object_reference_traits_decorator std::generate(begin, end, &derived::default_initializer); } +# ifndef ACE_LACKS_MEMBER_TEMPLATES + // Allow MSVC++ >= 8 checked iterators to be used. + template <typename iter> + inline static void copy_range( + object_type ** begin, object_type ** end, iter dst) + { + std::transform(begin, end, dst, &derived::duplicate); + } +#else inline static void copy_range( object_type ** begin, object_type ** end, object_type ** dst) { std::transform(begin, end, dst, &derived::duplicate); } +# endif /* !ACE_LACKS_MEMBER_TEMPLATES */ inline static void release_range( object_type ** begin, object_type ** end) diff --git a/TAO/tao/String_Traits_T.h b/TAO/tao/String_Traits_T.h index 3b55b49a011..ac36fe0e641 100644 --- a/TAO/tao/String_Traits_T.h +++ b/TAO/tao/String_Traits_T.h @@ -40,11 +40,21 @@ struct string_traits_decorator std::generate(begin, end, &derived::default_initializer); } +# ifndef ACE_LACKS_MEMBER_TEMPLATES + // Allow MSVC++ >= 8 checked iterators to be used. + template <typename iter> + inline static void copy_range( + char_type ** begin, char_type ** end, iter dst) + { + std::transform(begin, end, dst, &derived::duplicate); + } +# else inline static void copy_range( char_type ** begin, char_type ** end, char_type ** dst) { std::transform(begin, end, dst, &derived::duplicate); } +# endif /* !ACE_LACKS_MEMBER_TEMPLATES */ inline static void release_range( char_type ** begin, char_type ** end) diff --git a/TAO/tao/Unbounded_Octet_Sequence_T.h b/TAO/tao/Unbounded_Octet_Sequence_T.h index 3433a4312ee..239d10b758d 100644 --- a/TAO/tao/Unbounded_Octet_Sequence_T.h +++ b/TAO/tao/Unbounded_Octet_Sequence_T.h @@ -20,11 +20,11 @@ #include "tao/Unbounded_Value_Allocation_Traits_T.h" #include "tao/Value_Traits_T.h" #include "tao/Range_Checking_T.h" -#include "tao/checked_iterator.h" #include "tao/Basic_Types.h" #include "ace/Message_Block.h" #include "ace/OS_Memory.h" +#include "ace/checked_iterator.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -154,7 +154,7 @@ public: element_traits::copy_range( buffer_, buffer_ + length, - TAO_checked_array_iterator (tmp.buffer_, tmp.length_)); + ACE_make_checked_array_iterator (tmp.buffer_, tmp.length_)); swap(tmp); } return; @@ -165,7 +165,7 @@ public: element_traits::copy_range( buffer_, buffer_ + length_, - TAO_checked_array_iterator (tmp.buffer_, tmp.length_)); + ACE_make_checked_array_iterator (tmp.buffer_, tmp.length_)); element_traits::initialize_range( tmp.buffer_ + length_, tmp.buffer_ + length); swap(tmp); diff --git a/TAO/tao/checked_iterator.h b/TAO/tao/checked_iterator.h deleted file mode 100755 index 36f70f92a14..00000000000 --- a/TAO/tao/checked_iterator.h +++ /dev/null @@ -1,37 +0,0 @@ -// -*- C++ -*- - -#ifndef TAO_CHECKED_ITERATOR_H -#define TAO_CHECKED_ITERATOR_H - -/** - * @file checked_iterator.h - * - * @brief Checked iterator factory function. - * - * $Id$ - * - * @author Ossama Othman - */ - -# if defined (_MSC_VER) && (_MSC_VER >= 1400) -// Checked iterators are currently only supported in MSVC++ 8 or better. -# include <iterator> -# endif /* _MSC_VER >= 1400 */ - -# if defined (_MSC_VER) && (_MSC_VER >= 1400) -template <typename T> -stdext::checked_array_iterator<T *> -TAO_checked_array_iterator (T * buf, ptrdiff_t len) -{ - return stdext::checked_array_iterator<T *> (buf, len); -} -# else -template <typename T> -T * -TAO_checked_array_iterator (T * buf, ptrdiff_t /* len */) -{ - return buf; -} -# endif /* _MSC_VER >= 1400 */ - -#endif /* TAO_CHECKED_ITERATOR_H */ diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc index cdaec81abb6..123e5d8f471 100644 --- a/TAO/tao/tao.mpc +++ b/TAO/tao/tao.mpc @@ -287,7 +287,6 @@ project(TAO) : acelib, install, tao_output, taodefaults, pidl, extra_core, tao_v CDR.h CharSeqC.h CharSeqS.h - checked_iterator.h Cleanup_Func_Registry.h ClientRequestInterceptor_Adapter.h Client_Strategy_Factory.h |