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