diff options
| author | Comment <tim@gray.(none)> | 2013-10-15 00:49:21 -0700 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-10-15 00:49:21 -0700 |
| commit | 9d6fe33bea0f070356d02a9196e9dfbfa3d0cf8d (patch) | |
| tree | 82f3ebc7972a8746f7659660b741ae3d7c7628bb /rotord/src/rotor.cpp | |
| parent | 514624508d16f6a3f3e6419479642acc931b0f52 (diff) | |
noise node
Diffstat (limited to 'rotord/src/rotor.cpp')
| -rw-r--r-- | rotord/src/rotor.cpp | 99 |
1 files changed, 50 insertions, 49 deletions
diff --git a/rotord/src/rotor.cpp b/rotord/src/rotor.cpp index 444d861..26fc4a4 100644 --- a/rotord/src/rotor.cpp +++ b/rotord/src/rotor.cpp @@ -14,62 +14,63 @@ using Poco::Logger; Node_factory::Node_factory(){ //for now, statically load prototype map in constructor - //how to deal with categories - //have an associative array of arrays of pointers to nodes, "categories" + //how to deal with category + //have an associative array of arrays of pointers to nodes, "category" //this can be hard coded also // - categories["signals"]=vector<Node*>(); - add_type("time",new Time(),categories["signals"]); - add_type("track_time",new Track_time(),categories["signals"]); - add_type("at_track_time",new At_track_time(),categories["signals"]); + category["signals"]=vector<Node*>(); + add_type("time",new Time(),category["signals"]); + add_type("track_time",new Track_time(),category["signals"]); + add_type("at_track_time",new At_track_time(),category["signals"]); // add_type("signal_output",new Signal_output()); add_type("testcard",new Testcard()); // - categories["channels"]=vector<Node*>(); - add_type("invert",new Invert(),categories["channels"]); - add_type("monochrome",new Monochrome(),categories["channels"]); - add_type("blend",new Blend(),categories["channels"]); - add_type("image_arithmetic",new Image_arithmetic(),categories["channels"]); - add_type("alpha_merge",new Alpha_merge(),categories["channels"]); - add_type("difference_matte",new Difference_matte(),categories["channels"]); - add_type("rgb_levels",new RGB_levels(),categories["channels"]); - add_type("luma_levels",new Luma_levels(),categories["channels"]); + category["channels"]=vector<Node*>(); + add_type("invert",new Invert(),category["channels"]); + add_type("monochrome",new Monochrome(),category["channels"]); + add_type("blend",new Blend(),category["channels"]); + add_type("image_arithmetic",new Image_arithmetic(),category["channels"]); + add_type("alpha_merge",new Alpha_merge(),category["channels"]); + add_type("difference_matte",new Difference_matte(),category["channels"]); + add_type("rgb_levels",new RGB_levels(),category["channels"]); + add_type("luma_levels",new Luma_levels(),category["channels"]); - categories["source"]=vector<Node*>(); - add_type("signal_colour",new Signal_colour(),categories["source"]); - add_type("signal_greyscale",new Signal_greyscale(),categories["source"]); - add_type("shape",new Shape(),categories["source"]); - add_type("text",new Text(),categories["source"]); - add_type("waves",new Waves(),categories["source"]); - add_type("still_image",new Still_image(),categories["source"]); - add_type("video_loader",new Video_loader(),categories["source"]); + category["source"]=vector<Node*>(); + add_type("signal_colour",new Signal_colour(),category["source"]); + add_type("signal_greyscale",new Signal_greyscale(),category["source"]); + add_type("shape",new Shape(),category["source"]); + add_type("text",new Text(),category["source"]); + add_type("waves",new Waves(),category["source"]); + add_type("still_image",new Still_image(),category["source"]); + add_type("video_loader",new Video_loader(),category["source"]); - categories["distort"]=vector<Node*>(); - add_type("mirror",new Mirror(),categories["distort"]); - add_type("transform",new Transform(),categories["distort"]); + category["distort"]=vector<Node*>(); + add_type("mirror",new Mirror(),category["distort"]); + add_type("transform",new Transform(),category["distort"]); - categories["editing"]=vector<Node*>(); - add_type("video_cycler",new Video_cycler(),categories["editing"]); - add_type("video_output",new Video_output(),categories["editing"]); - add_type("act_segmenter",new Act_segmenter(),categories["editing"]); + category["editing"]=vector<Node*>(); + add_type("video_cycler",new Video_cycler(),category["editing"]); + add_type("video_output",new Video_output(),category["editing"]); + add_type("act_segmenter",new Act_segmenter(),category["editing"]); - categories["audio"]=vector<Node*>(); - add_type("audio_analysis",new Audio_analysis(),categories["audio"]); + category["audio"]=vector<Node*>(); + add_type("audio_analysis",new Audio_analysis(),category["audio"]); - categories["maths"]=vector<Node*>(); - add_type("comparison",new Comparison(),categories["maths"]); //TODO: alias to symbols - add_type("arithmetic",new Arithmetic(),categories["maths"]); //TODO: alias to symbols - add_type("bang",new Is_new_integer(),categories["maths"]); - add_type("on_off",new On_off(),categories["maths"]); - add_type("random",new Random(),categories["maths"]); + category["maths"]=vector<Node*>(); + add_type("comparison",new Comparison(),category["maths"]); //TODO: alias to symbols + add_type("arithmetic",new Arithmetic(),category["maths"]); //TODO: alias to symbols + add_type("bang",new Is_new_integer(),category["maths"]); + add_type("on_off",new On_off(),category["maths"]); + add_type("random",new Random(),category["maths"]); + add_type("noise",new Noise(),category["maths"]); - categories["fx"]=vector<Node*>(); - add_type("blur",new Blur(),categories["fx"]); - add_type("vhs",new VHS(),categories["fx"]); - add_type("echo_trails",new Echo_trails(),categories["fx"]); - add_type("video_feedback",new Video_feedback(),categories["fx"]); + category["fx"]=vector<Node*>(); + add_type("blur",new Blur(),category["fx"]); + add_type("vhs",new VHS(),category["fx"]); + add_type("echo_trails",new Echo_trails(),category["fx"]); + add_type("video_feedback",new Video_feedback(),category["fx"]); } bool Signal_input::connect(Node* source) { @@ -185,12 +186,12 @@ void Node_factory::list_nodes(xmlIO XML){ } void Node_factory::list_categories(xmlIO XML){ int i=0; - for (auto& category: categories) { + for (auto& _category: category) { XML.addTag("category"); - XML.addAttribute("category","name",category.first,i); + XML.addAttribute("category","name",_category.first,i); XML.pushTag("category",i); int j=0; - for (auto& node: category.second){ + for (auto& node: _category.second){ list_node(node,XML,j); j++; } @@ -199,8 +200,8 @@ void Node_factory::list_categories(xmlIO XML){ } } void Node_factory::list_categories(Json::Value &JSON){ - JSON["categories"]=Json::arrayValue; - for (auto& _category: categories) { + JSON["category"]=Json::arrayValue; + for (auto& _category: category) { Json::Value category; category["name"]=_category.first; category["nodes"]=Json::arrayValue; @@ -268,7 +269,7 @@ void Node_factory::list_categories(Json::Value &JSON){ } category["nodes"].append(node); } - JSON["categories"].append(category); + JSON["category"].append(category); } } void Node_factory::list_nodes(Json::Value &JSON){ |
