From d6571e5a9b8fc2bed416ff4798e3a29136004ff5 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 9 Jan 2014 16:50:51 +0000 Subject: beginnng json output --- NT/src/nodes.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'NT/src/nodes.h') diff --git a/NT/src/nodes.h b/NT/src/nodes.h index a32408e..da24292 100644 --- a/NT/src/nodes.h +++ b/NT/src/nodes.h @@ -6,9 +6,13 @@ using namespace std; namespace Rotor{ - class Time: public Node_type { + class Double_node: public Node_type { public: - Time(){}; + Double_node(){output_type="double";}; + }; + class Time: public Double_node { + public: + Time(){node_type="time";}; Time(map &settings):Time() { init(settings); }; @@ -20,11 +24,12 @@ namespace Rotor{ private: double value; }; - class Multiply: public Node_type { + class Multiply: public Double_node { public: Multiply(){ inlet=create_inlet("inlet"); value=create_inlet("value"); + node_type="multiply"; } Multiply(map &settings):Multiply() { init(settings); @@ -39,10 +44,15 @@ namespace Rotor{ Variable_type *value; double result; }; - class Print: public Node_type { + class String_node: public Node_type { + public: + String_node(){output_type="string";}; + }; + class Print: public String_node { public: Print(){ - inlet=create_inlet("inlet"); + inlet=create_inlet("inlet"); + node_type="print"; } Print(map &settings):Print() { init(settings); -- cgit v1.2.3