00001 #ifndef BOOST_RPC_RPCED_HPP
00002 #define BOOST_RPC_RPCED_HPP
00003
00004 #include <boost/rpc/config.hpp>
00005 #include <boost/detail/arity.hpp>
00006 #include <boost/function.hpp>
00007 #include <boost/rpc/function.hpp>
00008 #include <boost/utility/enable_if.hpp>
00009 #include <boost/rpc/detail/archive_out_param.hpp>
00010
00011 namespace boost {
00012 namespace rpc {
00013 namespace detail {
00014
00015 template<typename Signature, typename ArchivePair, int Arity, typename Enable=void>
00016 class marshaled_impl;
00017
00018 #define BOOST_ARITY_SEPARATE_VOID_RETURN
00019 #define BOOST_ARITY_ITERATION_PARAMS \
00020 (3,(0,BOOST_RPC_MAX_ARGS,<boost/rpc/detail/marshaled_template.hpp>))
00021 #include <boost/detail/arity_iterate.hpp>
00022 #undef BOOST_ARITY_ITERATION_PARAMS
00023 #undef BOOST_ARITY_SEPARATE_VOID_RETURN
00024 }
00025
00026 template<typename Signature, typename ArchivePair = binary_archive>
00027 class marshaled : public detail::marshaled_impl<Signature, ArchivePair, boost::function_traits<Signature>::arity>
00028 {
00029 public:
00030 marshaled(const boost::function<Signature> &f)
00031 : detail::marshaled_impl<Signature, ArchivePair, boost::function_traits<Signature>::arity>(f)
00032 {}
00033 };
00034
00035 }
00036 }
00037
00038 #endif // BOOST_RPC_RPCED_HPP