https://pastein.ru/t/Dv

  скопируйте уникальную ссылку для отправки

Загрузка данных


#include <Ice/Ice.h>
#include "CalculatorI.h"

using namespace std;


double
CalculatorI::sum(double a, double b, const Ice::Current&)
{
    cout << "Invoke sum for " << a << " and " << b << endl;
    return a + b;
}

double
CalculatorI::subs(double a, double b, const Ice:: Current&)
{
    cout << "Invoke sub for " << a << "and" << b << endl;
    return a - b;
}

double
CalculatorI::mult(double a, double b, const Ice:: Current&)
{
    cout << "Invoke mult for " << a << "and" << b << endl;
    return a * b;
}

double
CalculatorI::div(double a, double b, const Ice:: Current&)
{
    cout << "Invoke division for " << a << "and" << b << endl;
    return a / b;
}


void
CalculatorI::shutdown(const Ice::Current& c)
{
    cout << "Shutting down..." << endl;
    c.adapter->getCommunicator()->shutdown();
}