Value_Traits_T.h

Go to the documentation of this file.
00001 #ifndef guard_value_traits_hpp
00002 #define guard_value_traits_hpp
00003 /**
00004  * @file
00005  *
00006  * @brief Implement the element manipulation traits for types with
00007  * value-like semantics.
00008  *
00009  * $Id: Value_Traits_T.h 77677 2007-03-12 20:16:37Z ossama $
00010  *
00011  * @author Carlos O'Ryan
00012  */
00013 
00014 #include <algorithm>
00015 
00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00017 
00018 namespace TAO
00019 {
00020 namespace details
00021 {
00022 
00023 template<typename T, bool dummy>
00024 struct value_traits
00025 {
00026   typedef T value_type;
00027   typedef T const const_value_type;
00028 
00029   inline static void zero_range(
00030       value_type * begin , value_type * end)
00031   {
00032     std::fill(begin, end, value_type ());
00033   }
00034 
00035   inline static void initialize_range(
00036       value_type * begin, value_type * end)
00037   {
00038     std::fill(begin, end, value_type ());
00039   }
00040 
00041 # ifndef ACE_LACKS_MEMBER_TEMPLATES
00042   // Allow MSVC++ >= 8 checked iterators to be used.
00043   template <typename iter>
00044   inline static void copy_range(
00045       value_type * begin, value_type * end, iter dst)
00046   {
00047     std::copy(begin, end, dst);
00048   }
00049 # else
00050   inline static void copy_range(
00051       value_type * begin, value_type * end, value_type * dst)
00052   {
00053     std::copy(begin, end, dst);
00054   }
00055 # endif  /* !ACE_LACKS_MEMBER_TEMPLATES */
00056 };
00057 
00058 } // namespace details
00059 } // namespace CORBA
00060 
00061 TAO_END_VERSIONED_NAMESPACE_DECL
00062 
00063 #endif // guard_value_traits_hpp

Generated on Tue Feb 2 17:37:53 2010 for TAO by  doxygen 1.4.7