37 #ifndef ACTIONLIB__SERVER__SERVICE_SERVER_IMP_H_
38 #define ACTIONLIB__SERVER__SERVICE_SERVER_IMP_H_
45 template<
class ActionSpec>
47 boost::function<
bool(
const typename ActionSpec::_action_goal_type::_goal_type &,
48 typename ActionSpec::_action_result_type::_result_type & result)> service_cb)
52 return ServiceServer(server_ptr);
55 template<
class ActionSpec>
57 boost::function<
bool(
const Goal &, Result & result)> service_cb)
58 : service_cb_(service_cb)
65 template<
class ActionSpec>
68 goal.setAccepted(
"This goal has been accepted by the service server");
72 if (service_cb_(*(goal.getGoal()), r)) {
73 goal.setSucceeded(r,
"The service server successfully processed the request");
75 goal.setAborted(r,
"The service server failed to process the request");
80 #endif // ACTIONLIB__SERVER__SERVICE_SERVER_IMP_H_