Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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() ;
 }
Esempio n. 3
0
 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() ;
 }
Esempio n. 4
0
//Scientist
QString Service::scientistExists(ScientistSearch scientistSearch)
{
    return getErrorMessages(dataMan->scientistExists(scientistSearch));
}
Esempio n. 5
0
QString Service::computerExistsEdit(ComputerSearch computerSearch)
{
    return getErrorMessages(dataMan->computerExistsEdit(computerSearch));
}
Esempio n. 6
0
QString Service::relationExists(int sID, int cID)
{
    return getErrorMessages(dataMan->relationExists(sID, cID));
}