/** * @file ModuleConnection.h * @brief 模块连接信息类 * * @author 黄军 * @date 2011-7-27 */ #ifndef PAI_FRAME_WORKFLOWENGINE_MODULECONNECTION_H #define PAI_FRAME_WORKFLOWENGINE_MODULECONNECTION_H #include #include #include #include "Turtle.h" namespace pai { namespace workflow { /** * @brief 模块连接类 * */ class PAI_WORKFLOWENGINE_EXPORT CModuleConnection { private: /* * 起始模块id * 字段不能为空 * */ int m_iSourceId; /* * 终止模块id * 字段不能为空 */ int m_iDestId; /* * the output port variable of previous module * 字段不能为空 * */ std::string m_strOutPort; /* * the input port variable of next module * 字段不能为空 * */ std::string m_strInPort; public: int GetSourceId() const { return this->m_iSourceId;} int GetDestId() const { return this->m_iDestId;} std::string GetOutPort() const { return this->m_strOutPort;} std::string GetInPort() const { return this->m_strInPort;} void SetSourceId(int id ) { this->m_iSourceId = id; } void SetDestId(int id ) { this->m_iDestId = id; } void SetOutPort(const std::string& port ) { this->m_strOutPort = port; } void SetInPort(const std::string& port ) { this->m_strInPort = port; } void Print(); CModuleConnection(); virtual ~CModuleConnection(); /** * @breif 将内容拷贝给目标 * @parma destModuleInfo 拷贝的目标 */ void CopyTo(CModuleConnection& destModuleInfo); bool operator==(const CModuleConnection& that) const; friend std::ostream& operator<<(std::ostream& out, const CModuleConnection& connection); }; } } #endif