Commit c391c435 authored by 刘乐's avatar 刘乐

1, 修改

parent 16d3bd67
......@@ -82,7 +82,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hydraulicModel\Program\</OutDir>
<OutDir>..\..\hModelProgram\Program\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
......
......@@ -2,6 +2,7 @@
#include "CivDbConnection.h"
#include "CivTypes.h"
#include "CivCommonUtils.h"
#include "Epanet2.h"
#include <iostream>
......@@ -16,13 +17,13 @@ CivHydrCalc::~CivHydrCalc()
delete mDbConn;
}
bool CivHydrCalc::simulation(const char* fileName)
bool CivHydrCalc::simulation(char* fileName, char* rptFile, char* binOutFile, void (*pviewprog) (char*))
{
int result = ENepanet(fileName, rptFile, binOutFile, pviewprog);
return false;
}
bool CivHydrCalc::exportInp(const char* fileName)
bool CivHydrCalc::exportInp(char* fileName)
{
//1 ,获取管网组件
if (!mDbConn)
......@@ -90,11 +91,6 @@ QUALITY AGE
return true;
}
bool CivHydrCalc::importInp(const char* fileName)
{
}
void CivHydrCalc::assemble(const std::string& table, CivInp& inp)
{
std::string utf8Table = CivCommonUtils::string_To_UTF8(table);
......
......@@ -13,20 +13,18 @@ public:
~CivHydrCalc();
/**
*@brief 水力模拟计算
*/
bool simulation(const char* fileName);
/**
*@brief 导出inp文件
*/
bool exportInp(const char* fileName);
*@brief 水力模拟计算
*@inpFile:inp文件
*@rptFile: 输出文件
*@binOutFile: 二进制输出文件
*@pviewprog: 回调函数
*/
bool simulation(char* inpFile, char* rptFile, char* binOutFile, void (*pviewprog) (char*));
/**
*@brief inp文件导入
*@fileName 文件名
*@brief 导出inp文件
*/
bool importInp(const char* fileName);
bool exportInp(char* fileName);
private:
/**
*@brief 解析表字段名,按顺序写入
......
......@@ -5,10 +5,12 @@
int main(int argc, char* argv[])
{
const char* uri = "host=192.168.12.50 port=5432 dbname=JinXianNew user=postgres password=lcf7704241";
const char* uri = "host=192.168.12.7 port=5432 dbname=liuletext user=postgres password=admin";
char* findUri = const_cast<char*>(uri);
CivHydrCalc* calc = new CivHydrCalc(findUri, std::string("ˮģ"));
const char* fileName = "test.inp";
char fileName[10];
const char* file = "test.inp";
strcpy(fileName, file);
calc->exportInp(fileName);
calc->simulation(fileName);
......
......@@ -82,7 +82,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hydraulicModel\Program\</OutDir>
<OutDir>..\..\hModelProgram\Program\</OutDir>
<IncludePath>$(OUTDIR)..\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
......
......@@ -81,7 +81,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hydraulicModel\Program\</OutDir>
<OutDir>..\..\hModelProgram\Program\</OutDir>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment