21 std::cout <<
"Warning: variable " << it_p->
name() <<
"has already been entered\n";
22 std::cout <<
"Overwriting with new value\n";
36 for(
auto& node :
nodes){
48 if(!
nodes.count(val)){
49 std::cout<<g.
p->name()<<
" depends on "<<val<<
", which has not been inserted\n";
53 nodes[val].pointedat.push_back(g.
p->name());
57 std::list<item_wrapper >
graph::sort(
const std::list<item_wrapper >&
l){
58 std::list<item_wrapper > outlist;
59 std::list<const graphnode*> queuelist;
60 for(
const auto& val: l){
65 for(
const auto& node :
nodes){
68 queuelist.push_back(&g);
72 while(!queuelist.empty()){
74 queuelist.pop_front();
75 outlist.push_front(g.
p);
80 queuelist.push_back(&gn);
85 if(l.size() != outlist.size()){
86 err(
"Topological sort has failed, check for cyclical input dependencies",