summaryrefslogtreecommitdiff
path: root/NT/src/rotor.cpp
blob: c08734cf95118b0c3edb168449ccd7d41640d5f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>

#include "rotor.h"
#include "nodes.h"
#include "factory.h"

using namespace std;
using namespace Rotor;

//factory generates linker errors if rotor.h implementation is seperated: why?

int main(){
	Node_factory f;
/*
	map<string,string> settings={{"node_type","time"}};
	Node *t=f.create(settings);
	settings={{"value","2"},{"node_type","multiply"}};
	Node *m=f.create(settings);
	if (!m->connect("inlet",t)) printf("not connected...\n");
	settings={{"node_type","print"}};
	Node *p=f.create(settings);
	if (!p->connect("inlet",m)) printf("not connected...\n");
	for (double t=0;t<10.0;t+=0.765){
		Frame_parameters f=Frame_parameters(t,25.0,10.0,640,360);
		printf("%04f %s\n",t,(dynamic_cast<Node_type<string>*>(p))->get_output(f).c_str());
	}
	delete t;
	delete m;
	delete p;
*/
Json::Value js;
f.list_node("multiply",js);
Json::StyledWriter writer;
cerr<<writer.write(js)<<endl;
}