From f0b441a2c228e1059f4d153e27c41aa79f2e7761 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Mon, 18 Mar 2019 15:53:41 +0100
Subject: [PATCH] Fix #67

---
 src/param/param-definition.ts | 13 ++++++++++++-
 src/structure/structure.ts    |  6 ------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/param/param-definition.ts b/src/param/param-definition.ts
index 5c86b0db..d8575147 100644
--- a/src/param/param-definition.ts
+++ b/src/param/param-definition.ts
@@ -1,4 +1,4 @@
-import { CalculatorType } from "../compute-node";
+import { CalculatorType, ComputeNode } from "../compute-node";
 import { Nub } from "../nub";
 import { Interval } from "../util/interval";
 import { Message, MessageCode } from "../util/message";
@@ -108,6 +108,17 @@ export class ParamDefinition implements INamedIterableValues, IObservable {
         return this.nubUid + "_" + this._symbol;
     }
 
+    get parentComputeNode(): ComputeNode {
+        let parentCN: ComputeNode;
+        if (this._parent) {
+            // ComputeNode utilisant le ParamsEquation
+            parentCN = this._parent.parent;
+        } else {
+            throw new Error("ParamDefinition.parentNub : parameter has no parent !");
+        }
+        return parentCN;
+    }
+
     /**
      * Identifiant unique du Nub parent
      */
diff --git a/src/structure/structure.ts b/src/structure/structure.ts
index c525d948..396a6bf7 100644
--- a/src/structure/structure.ts
+++ b/src/structure/structure.ts
@@ -266,10 +266,4 @@ export abstract class Structure extends Nub {
         }
     }
 
-    protected setExtraResultsFamilies() {
-        this._extraResultsFamilies = {
-            Q: ParamFamily.FLOWS
-        };
-    }
-
 }
-- 
GitLab