#include "factory.h" using namespace Rotor; Node_factory::Node_factory(){ //for now, statically load prototype map in constructor add_type(new Time(),"nodes"); add_type(new Multiply(),"nodes"); add_type(new Print(),"nodes"); } bool Node_factory::list_node(const string &_type,Json::Value &json){ for (auto& type: type_map) { cerr<to_json(); return true; } } json["error"]="Node '"+_type+"' not found"; return false; };