Skip to content
Snippets Groups Projects
Commit 14672f9c authored by François Grand's avatar François Grand
Browse files

let PressureLoss implement IObservable interface rather than Observer

refs #334
parent ab617037
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ import { PressureLossParams } from "./pressureloss_params";
import { PressureLossLaw } from "../pipe_flow/pressureloss_law";
import { PressureLossLawParams } from "../pipe_flow/pressurelosslaw_params";
export class PressureLoss extends Nub implements Observer {
export class PressureLoss extends Nub {
constructor(law: PressureLossLaw, dbg: boolean = false) {
super(new PressureLossParams(), dbg);
......@@ -43,8 +43,13 @@ export class PressureLoss extends Nub implements Observer {
return this.child.Equation(sVarCalc);
}
// interface Observer
// interface IObservable
public update(sender: any, data: any) {
public addObserver(o: Observer) {
this.child.addObserver(o);
}
public removeObserver(o: Observer) {
this.child.removeObserver(o);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment