From 8b42ce019faa5a07769db3999e134a27173335ce Mon Sep 17 00:00:00 2001 From: "francois.grand" <francois.grand@irstea.fr> Date: Thu, 3 Aug 2017 15:54:10 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20de=20la=20classe=20ComputeNodeParameter?= =?UTF-8?q?s=20de=20gestion=20des=20param=C3=A8tres=20des=20noeuds=20de=20?= =?UTF-8?q?calcul?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 2 +- src/parameters.ts | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/parameters.ts diff --git a/src/index.ts b/src/index.ts index c3881b8c..bde5cd73 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ export * from './base'; export * from './param'; +export * from './parameters'; export * from './nub'; export * from './cond_distri'; export * from './dichotomie'; @@ -8,4 +9,3 @@ export * from './regime_uniforme'; export * from './util/definedvalue'; export * from './util/numericalstring'; export * from './util/error'; - diff --git a/src/parameters.ts b/src/parameters.ts new file mode 100644 index 00000000..68b62f9f --- /dev/null +++ b/src/parameters.ts @@ -0,0 +1,23 @@ +import { IParamsEquation } from "./param"; +import { ConduiteDistribParams } from "./cond_distri"; + +export class ComputeNodeParameters { + private static _instance: ComputeNodeParameters; + + private constructor() { } + + public static getInstance() { + if (ComputeNodeParameters._instance == undefined) + ComputeNodeParameters._instance = new ComputeNodeParameters(); + return ComputeNodeParameters._instance; + } + + public getComputeNodeParameters(name: string): IParamsEquation { + if (name == "cond_distri") { + let cn = new ConduiteDistribParams(undefined, undefined, undefined, undefined, undefined); + return cn; + } + + return undefined; + } +} -- GitLab