#pragma once #include #include #include #include namespace wfr { namespace wep { // Forward declarations class WorkflowExecutionPlan; class AbstractWepNode; // main namespace namespace utils { class WepDotFileWriter { // Invariant properties that can be accessed directly. public: typedef std::set visitedNodes_t; const std::shared_ptr wep; const std::string workflowName; // Non-Public functions private: void writeWepNodeAndEdges(std::ofstream& outfile, AbstractWepNode* node, visitedNodes_t& visitedNodes); std::string getNodeType(AbstractWepNode* node); std::string getNodeLabel(AbstractWepNode* node); std::string getNodeID(AbstractWepNode* node); std::string getNodeShape(AbstractWepNode* node); std::string getNodeStatus(AbstractWepNode* node); std::string getNodeVisitationCount(AbstractWepNode* node); public: WepDotFileWriter(const std::shared_ptr& wep) noexcept; void printToFile(); void printToFile(const std::string fileName); }; } /* namespace utils */ } /* namespace wep */ } /* namespace wfr */