path_finder_s11n.hpp
Go to the documentation of this file.00001 #ifndef s11n_net_s11n_PROXY_PATH_FINDER_HPP_INCLUDED
00002 #define s11n_net_s11n_PROXY_PATH_FINDER_HPP_INCLUDED 1
00003
00004 #include <s11n.net/s11n/plugin/path_finder.hpp>
00005 #include <s11n.net/s11n/proxy/listish.hpp>
00006
00007 namespace s11n { namespace plugin {
00008
00009
00010
00011
00012 struct path_finder_s11n
00013 {
00014
00015 template <typename NodeType>
00016 bool operator()( NodeType & dest, const path_finder & src ) const
00017 {
00018 typedef ::s11n::node_traits<NodeType> TR;
00019 if( ! ::s11n::list::serialize_streamable_list( dest, "path", src.path() ) ) return false;
00020 if( ! ::s11n::list::serialize_streamable_list( dest, "extensions", src.extensions() ) ) return false;
00021 return true;
00022 }
00023
00024
00025 template <typename NodeType>
00026 bool operator()( const NodeType & src, path_finder & dest ) const
00027 {
00028 typedef ::s11n::node_traits<NodeType> TR;
00029 if( ! ::s11n::list::deserialize_streamable_list( src, "path", dest.path() ) )return false;
00030 if( ! ::s11n::list::deserialize_streamable_list( src, "extensions", dest.extensions() ) ) return false;
00031 return true;
00032 }
00033
00034 };
00035
00036 }}
00037
00038 #define S11N_TYPE s11n::plugin::path_finder
00039 #define S11N_TYPE_NAME "s11n::plugin::path_finder"
00040 #define S11N_SERIALIZE_FUNCTOR s11n::plugin::path_finder_s11n
00041 #include <s11n.net/s11n/reg_s11n_traits.hpp>
00042 #endif // s11n_net_s11n_PROXY_PATH_FINDER_HPP_INCLUDED