mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 18:36:30 +01:00
29 lines
No EOL
508 B
JavaScript
29 lines
No EOL
508 B
JavaScript
import {Generator} from "../id-generator";
|
|
import {Param as SolverParam} from '../constr/solver';
|
|
|
|
export class Param {
|
|
|
|
constructor(value, debugSymbol) {
|
|
this.id = Generator.genID();
|
|
this.value = value;
|
|
this.solverParam = new SolverParam(value, this);
|
|
this.debugSymbol = debugSymbol || 'X';
|
|
}
|
|
|
|
set(value) {
|
|
this.value = value;
|
|
}
|
|
|
|
get() {
|
|
return this.value;
|
|
}
|
|
|
|
toString() {
|
|
return this.debugSymbol + this.id;
|
|
}
|
|
|
|
visitParams(callback) {
|
|
callback(this);
|
|
}
|
|
|
|
} |