00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef S11N_TEMPLATE_TYPE
00010 #error "You must define S11N_TEMPLATE_TYPE before including this file. e.g., to std::list or std::vector."
00011 #endif
00012
00013 #ifndef S11N_TEMPLATE_TYPE_NAME
00014 #error "You must define S11N_TEMPLATE_TYPE_NAME before including this file. e.g., to \"list\" or \"vector\"."
00015 #endif
00016
00017 #ifndef S11N_TEMPLATE_TYPE_PROXY
00018 # error "You must define S11N_TEMPLATE_TYPE_PROXY before including this file. e.g., ::s11n::list::list_serializable_proxy"
00019 #endif
00020
00021 #ifndef S11N_TEMPLATE_TYPE_DESER_PROXY
00022 # define S11N_TEMPLATE_TYPE_DESER_PROXY S11N_TEMPLATE_TYPE_PROXY
00023 #endif
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef S11N_TEMPLATE_TYPENAME_T1
00033 # define S11N_TEMPLATE_TYPENAME_T1 typename
00034 #endif
00035
00036 #define S11N_TEMPLATE_TYPE_Q S11N_TEMPLATE_TYPE< T1 >
00037
00038 namespace s11n {
00039
00040
00041
00042
00043
00044
00045 template < S11N_TEMPLATE_TYPENAME_T1 T1 >
00046 struct S11N_EXPORT_API s11n_traits < S11N_TEMPLATE_TYPE_Q >
00047 {
00048 typedef S11N_TEMPLATE_TYPE_Q serializable_type;
00049 typedef S11N_TEMPLATE_TYPE_PROXY serialize_functor;
00050 typedef S11N_TEMPLATE_TYPE_DESER_PROXY deserialize_functor;
00051 typedef ::s11n::default_cleanup_functor< S11N_TEMPLATE_TYPE_Q > cleanup_functor;
00052 typedef ::s11n::cl::object_factory<serializable_type> factory_type;
00053 static const bool cl_reg_placeholder;
00054 static const std::string class_name( const serializable_type * instance_hint )
00055 {
00056 if( cl_reg_placeholder == true );
00057 return S11N_TEMPLATE_TYPE_NAME;
00058 }
00059
00060 };
00061 template < S11N_TEMPLATE_TYPENAME_T1 T1 >
00062 const bool s11n_traits<
00063 S11N_TEMPLATE_TYPE_Q
00064 >::cl_reg_placeholder =
00065 (
00066 ::s11n::cl::classloader_register_base< S11N_TEMPLATE_TYPE_Q >(s11n_traits< S11N_TEMPLATE_TYPE_Q >::class_name(0)),
00067 true
00068 ) ;
00069 }
00070
00071 #undef S11N_TEMPLATE_TYPE_Q
00072 #undef S11N_TEMPLATE_TYPE_PROXY
00073 #undef S11N_TEMPLATE_TYPE_DESER_PROXY
00074 #undef S11N_TEMPLATE_TYPE_NAME
00075 #undef S11N_TEMPLATE_TYPE
00076 #undef S11N_TEMPLATE_TYPENAME_T1