Commit efe57c52 authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Serialisation of PabCloisons

Showing with 19 additions and 0 deletions
+19 -0
...@@ -77,6 +77,25 @@ export class PabCloisons extends Cloisons { ...@@ -77,6 +77,25 @@ export class PabCloisons extends Cloisons {
this._children = modelCloisons ? modelCloisons.structures : []; this._children = modelCloisons ? modelCloisons.structures : [];
} }
/**
* Returns an object representation of the Nub's current state
*/
public objectRepresentation() {
const ret: any = {
uid: this.uid,
props: this.properties.props,
parameters: []
};
// ! do not iterate over local parameters (would copy the parameters of the Cloisons used as model),
// just serialise QA
ret.parameters.push(this.prms.QA.objectRepresentation());
// ! do not iterate over children Nubs (would copy the children of the Cloisons used as model)
return ret;
}
/** /**
* paramétrage de la calculabilité des paramètres * paramétrage de la calculabilité des paramètres
*/ */
......
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