void Simple::generateObservables(vpz::AtomicModel& model, vpz::Observables& observables) { std::string observableName((fmt("obs_DE_%1%") % model.getName()).str()); if (observables.exist(observableName)) { vpz::Observable& observable(observables.get(observableName)); if (not observable.exist(mNameValue.getVariableName())) { observable.add(mNameValue.getVariableName()); } } else { vpz::Observable observable(observableName); observable.add(mNameValue.getVariableName()); observables.add(observable); } if (model.observables().empty()) { model.setObservables(observableName); } }
void ObsAndViewBox::show(vpz::Observables& obs, std::string name, vpz::Views& views) { mAll_Obs = &obs; mObs = &(obs.get(name)); mViews = &views; mAll_Obs_backup = new vpz::Observables(*mAll_Obs); mViews_backup = new vpz::Views(*mViews); makeObs(); makeViews(); mDialog->set_title(_("Observable ")+name); mDialog->show_all(); mDialog->run(); mDialog->hide(); }