#include "CivHydrFuncInter.h"
#include "CivHydrCalc.h"


bool DLLEXPORT simulation(char* uri, char* netName, char* flag)
{

    char fileName[20];
    char rptR[20];
    char outBinFile[20];

    strcpy_s(fileName, "test.inp");
    strcpy_s(rptR, "test.rpt");
    strcpy_s(outBinFile, "test.bin");

    CivHydrCalc* calc = new CivHydrCalc(uri, netName);

    bool msg = false;;
    if (strcmp(flag,"HDY")==0)
        msg = calc->hydrSimulation( fileName, rptR, outBinFile);
    else if(strcmp(flag, "QUALITY")==0)
        msg = calc->qualitySimulation(fileName, rptR, outBinFile);

    delete calc;
    return msg;
}