1 #ifndef OBJECT_REQUEST_FUTURE_HPP
2 #define OBJECT_REQUEST_FUTURE_HPP
3 #include <graphlab/serialization/serialization_includes.hpp>
4 #include <graphlab/rpc/dc_types.hpp>
5 #include <graphlab/rpc/dc_internal_types.hpp>
6 #include <graphlab/rpc/reply_increment_counter.hpp>
7 #include <graphlab/rpc/function_ret_type.hpp>
37 typedef typename dc_impl::function_ret_type<T>::type result_type;
38 mutable std::auto_ptr<dc_impl::reply_ret_type> reply;
44 reply(new dc_impl::reply_ret_type(REQUEST_WAIT_METHOD)),
67 hasval(val.hasval) { }
81 iarchive iarc(reply->val.c, reply->val.len);
89 return (hasval || reply->flag == 0);
104 struct request_future<void> {
105 typedef dc_impl::function_ret_type<void>::type result_type;
106 mutable std::auto_ptr<dc_impl::reply_ret_type> reply;
110 reply(new dc_impl::reply_ret_type(REQUEST_WAIT_METHOD)),
119 hasval(val.hasval) { }
128 return (hasval || reply->flag == 0);
137 iarchive iarc(reply->val.c, reply->val.len);