blob: f6229f1a7cbfcdb7761a24a51c04a93f6f13241a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "Circuit.h"
#include "NodeFactory.h"
void Circuit::create(string label, vector<string> nodes) {
if (nodes.size() == 1 && NodeFactory::has_type(nodes[0]))
return new_node(label, nodes[0]);
for (string node : nodes)
new_net(label, node);
}
void Circuit::new_node(string label, string type) {
printf("[%s] (%s)\n", label.c_str(), type.c_str());
}
void Circuit::new_net(string label, string connection) {
printf("[%s] -> %s\n", label.c_str(), connection.c_str());
}
|