Commit f89533f0 authored by Grand Francois's avatar Grand Francois
Browse files

classe ComputeNodeParameters : ajout du cas des sections paramétrées

Showing with 54 additions and 12 deletions
+54 -12
...@@ -6,6 +6,10 @@ export * from './cond_distri'; ...@@ -6,6 +6,10 @@ export * from './cond_distri';
export * from './dichotomie'; export * from './dichotomie';
export * from './lechaptcalmon'; export * from './lechaptcalmon';
export * from './regime_uniforme'; export * from './regime_uniforme';
export * from './section/section_trapez';
export * from './section/section_rectang';
export * from './section/section_circulaire';
export * from './section/section_puissance';
export * from './util/definedvalue'; export * from './util/definedvalue';
export * from './util/numericalstring'; export * from './util/numericalstring';
export * from './util/error'; export * from './util/error';
import { IParamsEquation } from "./param"; import { IParamsEquation } from "./param";
import { ConduiteDistribParams, ConduiteDistrib } from "./cond_distri"; import { ConduiteDistribParams, ConduiteDistrib } from "./cond_distri";
import { LechaptCalmonParams, LechaptCalmon } from "./lechaptcalmon"; import { LechaptCalmonParams, LechaptCalmon } from "./lechaptcalmon";
import { ParamsSectionTrapez, cSnTrapez } from "./section/section_trapez";
import { ParamsSectionRectang, cSnRectang } from "./section/section_rectang";
import { ParamsSectionCirc, cSnCirc } from "./section/section_circulaire";
import { ParamsSectionPuiss, cSnPuiss } from "./section/section_puissance";
export class ComputeNodeParameters { export class ComputeNodeParameters {
private static _instance: ComputeNodeParameters; private static _instance: ComputeNodeParameters;
...@@ -14,17 +18,51 @@ export class ComputeNodeParameters { ...@@ -14,17 +18,51 @@ export class ComputeNodeParameters {
} }
public getComputeNodeParameters(name: string): IParamsEquation { public getComputeNodeParameters(name: string): IParamsEquation {
if (name == "cond_distri") { switch (name) {
let cn = new ConduiteDistribParams(undefined, undefined, undefined, undefined, undefined); case "cond_distri":
let n = new ConduiteDistrib(cn); // pour initialiser la calculabilité des paramètres {
return cn; let cn = new ConduiteDistribParams(undefined, undefined, undefined, undefined, undefined);
} else let n = new ConduiteDistrib(cn); // pour initialiser la calculabilité des paramètres
if (name == "lechapt_calmon") { return cn;
let cn = new LechaptCalmonParams(undefined, undefined, undefined, undefined, undefined, undefined, undefined); }
let n = new LechaptCalmon(cn); // pour initialiser la calculabilité des paramètres
return cn; case "lechapt_calmon":
} {
let cn = new LechaptCalmonParams(undefined, undefined, undefined, undefined, undefined, undefined, undefined);
return undefined; let n = new LechaptCalmon(cn); // pour initialiser la calculabilité des paramètres
return cn;
}
case "section_param_trapez":
{
let cn = new ParamsSectionTrapez(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
let n = new cSnTrapez(undefined, cn); // pour initialiser la calculabilité des paramètres
return cn;
}
case "section_param_rect":
{
let cn = new ParamsSectionRectang(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
let n = new cSnRectang(undefined, cn); // pour initialiser la calculabilité des paramètres
return cn;
}
case "section_param_circ":
{
let cn = new ParamsSectionCirc(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
let n = new cSnCirc(undefined, cn); // pour initialiser la calculabilité des paramètres
return cn;
}
case "section_param_para":
{
let cn = new ParamsSectionPuiss(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined);
let n = new cSnPuiss(undefined, cn); // pour initialiser la calculabilité des paramètres
return cn;
}
default:
throw "ComputeNodeParameters.getComputeNodeParameters() : nub '" + name + "' non pris en charge";
}
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment