/** * @brief Pretty print the plan tree. * @param The plan tree * @return none. */ void PlanExecutor::PrintPlan(const planner::AbstractPlan *plan, std::string prefix) { if (plan == nullptr) return; prefix += " "; LOG_TRACE("%s->Plan Type :: %d ", prefix.c_str(), plan->GetPlanNodeType()); auto &children = plan->GetChildren(); for (auto &child : children) { PrintPlan(child.get(), prefix); } }
/** * @brief Pretty print the plan tree. * @param The plan tree * @return none. */ void PlanExecutor::PrintPlan(const planner::AbstractPlan *plan, std::string prefix) { if (plan == nullptr) { LOG_TRACE("Plan is null"); return; } prefix += " "; LOG_TRACE("Plan Type: %s", PlanNodeTypeToString(plan->GetPlanNodeType()).c_str()); LOG_TRACE("%s->Plan Info :: %s ", prefix.c_str(), plan->GetInfo().c_str()); auto &children = plan->GetChildren(); LOG_TRACE("Number of children in plan: %d ", (int)children.size()); for (auto &child : children) { PrintPlan(child.get(), prefix); } }