string Contract::toString() { stringstream description; validate(); if (!isOK()) { description << "Contract has errors,"; vector<string> errorMessages = getErrorMessages(); for (size_t i = 0; i < errorMessages.size(); ++i) { description << errorMessages[i] << ","; } return description.str(); } description << toStringContract(); return description.str(); }
string MultipleInstrumentContract::toString(boost::shared_ptr<RatesEnvironment> re) { validate(re); stringstream description; if (!isOK()) { description << "Contract has errors,"; vector<string> errorMessages = getErrorMessages(); for (size_t i = 0; i < errorMessages.size(); ++i) { description << errorMessages[i] << ","; } return description.str(); } description << "Net MtM," << fixed << setprecision(4) << getValue(re) << "\n"; description << toStringRates(re); return description.str() ; }
string Contract::toString(boost::shared_ptr<RatesEnvironment> re) { validate(re); stringstream description; if (!isOK()) { description << "Contract has errors,"; vector<string> errorMessages = getErrorMessages(); for (size_t i = 0; i < errorMessages.size(); ++i) { description << errorMessages[i] << ","; } return description.str(); } description << toStringContract(); description << toStringRates(re); return description.str() ; }
//Scientist QString Service::scientistExists(ScientistSearch scientistSearch) { return getErrorMessages(dataMan->scientistExists(scientistSearch)); }
QString Service::computerExistsEdit(ComputerSearch computerSearch) { return getErrorMessages(dataMan->computerExistsEdit(computerSearch)); }
QString Service::relationExists(int sID, int cID) { return getErrorMessages(dataMan->relationExists(sID, cID)); }