43 lines
935 B
C++
43 lines
935 B
C++
#ifndef OPENMANUS_FLOW_FLOW_FACTORY_H
|
|
#define OPENMANUS_FLOW_FLOW_FACTORY_H
|
|
|
|
#include <string>
|
|
#include <memory>
|
|
#include <vector>
|
|
#include "base_flow.h"
|
|
#include "planning_flow.h"
|
|
|
|
namespace openmanus {
|
|
|
|
/**
|
|
* @class FlowFactory
|
|
* @brief 流程工厂,用于创建不同类型的流程
|
|
*/
|
|
class FlowFactory {
|
|
public:
|
|
/**
|
|
* @brief 创建流程
|
|
* @param flow_type 流程类型
|
|
* @param agent 主要代理
|
|
* @return 流程
|
|
*/
|
|
static std::shared_ptr<BaseFlow> createFlow(
|
|
FlowType flow_type,
|
|
std::shared_ptr<AgentBase> agent
|
|
);
|
|
|
|
/**
|
|
* @brief 创建流程
|
|
* @param flow_type 流程类型
|
|
* @param agents 多个代理
|
|
* @return 流程
|
|
*/
|
|
static std::shared_ptr<BaseFlow> createFlow(
|
|
FlowType flow_type,
|
|
const std::vector<std::shared_ptr<AgentBase>>& agents
|
|
);
|
|
};
|
|
|
|
} // namespace openmanus
|
|
|
|
#endif // OPENMANUS_FLOW_FLOW_FACTORY_H
|