void downstream_manager::abort(error reason) { CAF_LOG_TRACE(CAF_ARG(reason)); for_each_path([&](outbound_path& x) { auto tmp = reason; about_to_erase(&x, false, &tmp); }); clear_paths(); }
std::vector<stream_slot> downstream_manager::path_slots() { std::vector<stream_slot> xs; xs.reserve(num_paths()); for_each_path([&](outbound_path& x) { xs.emplace_back(x.slots.sender); }); return xs; }
void operator()(const PATHS& _paths, duration_type& _duration) { typedef typename ForEachPath<PATHS,true>::path_type path_type; typedef typename path_type::point_type move_type; for_each_path(_paths,[&](const path_type& _path) { typedef std::pair<move_type,move_type> move_pair; gex::for_each<move_pair>(_path,[&_duration](const move_type& _prev, const move_type& _next) { auto _length = gex::distance(_prev,_next); _duration += _length / _prev.speed(); }); }); }