2
3
4
5
13
14
20
21
25
26
27
28
29
30 directed_acyclic_node(
const std::string& name,
const std::vector<std::string>& dependencies,
const std::function<
void()>& func)
37
38
44
45
49
50
54
55
59
60
65
66
72
73
77
78
82
83
84
88
89
93
94
95
101
102
103
104
110
111
directed_acyclic_graph()=default
Constructor Function.
void add_node(directed_acyclic_node *node)
Add a node to this graph.
void execute_internal(directed_acyclic_node *node, std::unordered_map< std::string, bool > &visited)
Execute a node's function.
std::unordered_map< std::string, directed_acyclic_node * > m_Nodes
Graph Nodes.
void execute()
Execute all node function by order.
virtual ~directed_acyclic_graph()=default
Destructor Function.
size_t size() const
Get Node size.
std::string m_Name
Node name.
std::vector< std::string > m_Dependencies
Node dependencies name.
directed_acyclic_node()=delete
Constructor Function.
std::function< void()> m_Func
Node function.
directed_acyclic_node(const std::string &name, const std::vector< std::string > &dependencies, const std::function< void()> &func)
Constructor Function.
virtual ~directed_acyclic_node()=default
Destructor Function.