DECLARE_EXPORT void Load::setAlternateName(string n) { if (!getOperation()) throw LogicException("Can't set an alternate load before setting the operation"); Load *x = getOperation()->loaddata.find(n); if (!x) throw DataException("Can't find load with name '" + n + "'"); setAlternate(x); }
DECLARE_EXPORT void Flow::setAlternateName(const string& n) { if (!getOperation()) throw LogicException("Can't set an alternate flow before setting the operation"); Flow *x = getOperation()->flowdata.find(n); if (!x) throw DataException("Can't find flow with name '" + n + "'"); setAlternate(x); }