00001 #ifndef s11n_net_s11n_std_pair_HPP_INCLUDED 00002 #define s11n_net_s11n_std_pair_HPP_INCLUDED 1 00003 00004 #include <s11n.net/s11n/proxy/mapish.hpp> 00005 00006 #define S11N_TEMPLATE_TYPE std::pair 00007 #define S11N_TEMPLATE_TYPE_NAME "pair" 00008 // #define S11N_TEMPLATE_TYPE_PROXY ::s11n::map::pair_serializable_proxy 00009 #define S11N_TEMPLATE_TYPE_PROXY ::s11n::map::serialize_pair_f 00010 #define S11N_TEMPLATE_TYPE_DESER_PROXY ::s11n::map::deserialize_pair_f 00011 #include <s11n.net/s11n/proxy/reg_s11n_traits_template2.hpp> 00012 00013 namespace s11n { 00014 00015 template <typename T1, typename T2> 00016 struct default_cleanup_functor< std::pair<T1,T2> > 00017 { 00018 typedef T1 first_type; 00019 typedef T2 second_type; 00020 typedef std::pair<T1,T2> serializable_type; 00021 void operator()( serializable_type & p ) const 00022 { 00023 using namespace s11n::debug; 00024 S11N_TRACE(TRACE_CLEANUP) << "default_cleanup_functor<> specialization cleaning up pair<>...\n"; 00025 typedef typename type_traits<first_type>::type TR1; 00026 typedef typename type_traits<second_type>::type TR2; 00027 cleanup_serializable<TR1>( p.first ); 00028 cleanup_serializable<TR2>( p.second ); 00029 00030 } 00031 }; 00032 } 00033 00034 #endif // s11n_net_s11n_std_pair_HPP_INCLUDED