diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-12 18:03:07 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-12 18:03:07 +0200 |
commit | 50d3fb09278d57b5a35e15074cc025a62476c5a7 (patch) | |
tree | dbd7c9f62e49c0ef01e5d970758f08450e2a2af5 /Circuit.cpp | |
parent | a6eb3c69badee386579fba82cae5b29cfb3e8171 (diff) |
WIP NodeInput kinda not really working
Diffstat (limited to 'Circuit.cpp')
-rw-r--r-- | Circuit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Circuit.cpp b/Circuit.cpp index 8137939..d6a5375 100644 --- a/Circuit.cpp +++ b/Circuit.cpp @@ -2,6 +2,8 @@ #include "Exception.h" #include "NodeFactory.h" +#include "prut.h" + void Circuit::create(string label, vector<string> nodes) { if (nodes.size() == 1 && NodeFactory::has_type(nodes[0])) return new_node(label, nodes[0]); @@ -19,7 +21,7 @@ void Circuit::new_node(string label, string type) { nodes[label] = node; - printf("[%s] (%s)\n", label.c_str(), type.c_str()); + prutprintf("[%s] (%s)", label.c_str(), type.c_str()); } void Circuit::new_net(string src, vector<string> dests) { @@ -36,6 +38,7 @@ void Circuit::new_net(string src, vector<string> dests) { if (node == nullptr) throw CircuitException("unknown destination node \"%s\"", dest.c_str()); node->addInput(net); + prutprintf("%s -> %s", src.c_str(), dest.c_str()); } } |