diff options
Diffstat (limited to 'rotord/rotor.h')
| -rwxr-xr-x | rotord/rotor.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h index cd83676..aab0af9 100755 --- a/rotord/rotor.h +++ b/rotord/rotor.h @@ -115,10 +115,10 @@ namespace Rotor { Signal_input(const string &_desc): Input(_desc){}; }; - class Node{ + class Node{ public: Node(){}; - virtual ~Node() {}; + virtual ~Node(){}; Node(map<string,string> &settings){ cerr << "Node:"; for (map<string,string>::iterator it=settings.begin();it!=settings.end();++it) { @@ -126,7 +126,7 @@ namespace Rotor { } cerr << endl; description=settings["description"];type=settings["type"];output_type=settings["output"];ID=settings["ID"]; - }; + }; UUID uid; //every usable node has a UUID int id; vector<Signal_input*> inputs; //simple node has signal inputs and outputs @@ -151,6 +151,18 @@ namespace Rotor { class Image{ char* data; }; + class Signal_node: public Node{ + public: + Signal_node(){}; + Signal_node(map<string,string> &settings){ + cerr << "Signal_node:"; + for (map<string,string>::iterator it=settings.begin();it!=settings.end();++it) { + cerr << it->first << "," << it->second << " "; + } + cerr << endl; + description=settings["description"];type=settings["type"];output_type=settings["output"];ID=settings["ID"]; + }; + }; class Image_node: public Node{ public: vector<Image_input> image_inputs; //image node also has image inputs and outputs @@ -173,7 +185,7 @@ namespace Rotor { float image_time; }; //actual nodes------------------------------------------------- - class Audio_analysis: public Node { + class Audio_analysis: public Signal_node { public: Audio_analysis(){}; Audio_analysis(map<string,string> &settings) { @@ -189,7 +201,7 @@ namespace Rotor { return t; } }; - class Is_new_integer: public Node { + class Is_new_integer: public Signal_node { //does this require knowing what the framerate is? //for now, assume 25 //what to cache? for now, don't cache @@ -208,7 +220,7 @@ namespace Rotor { else return 0.0f; } }; - class Signal_output: public Node { + class Signal_output: public Signal_node { public: Signal_output(){}; Signal_output(map<string,string> &settings) { @@ -240,6 +252,7 @@ namespace Rotor { }; Node* create(map<string,string> &settings){ if (type_map.find(settings["type"])!=type_map.end()) { + cerr << "Factory: creating " << settings["type"] << endl; return clone(type_map[settings["type"]],settings); } else return NULL; |
