Commit c391c435 authored by 刘乐's avatar 刘乐

1, 修改

parent 16d3bd67
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hydraulicModel\Program\</OutDir> <OutDir>..\..\hModelProgram\Program\</OutDir>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include "CivDbConnection.h" #include "CivDbConnection.h"
#include "CivTypes.h" #include "CivTypes.h"
#include "CivCommonUtils.h" #include "CivCommonUtils.h"
#include "Epanet2.h"
#include <iostream> #include <iostream>
...@@ -16,13 +17,13 @@ CivHydrCalc::~CivHydrCalc() ...@@ -16,13 +17,13 @@ CivHydrCalc::~CivHydrCalc()
delete mDbConn; 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; return false;
} }
bool CivHydrCalc::exportInp(const char* fileName) bool CivHydrCalc::exportInp(char* fileName)
{ {
//1 ,获取管网组件 //1 ,获取管网组件
if (!mDbConn) if (!mDbConn)
...@@ -90,11 +91,6 @@ QUALITY AGE ...@@ -90,11 +91,6 @@ QUALITY AGE
return true; return true;
} }
bool CivHydrCalc::importInp(const char* fileName)
{
}
void CivHydrCalc::assemble(const std::string& table, CivInp& inp) void CivHydrCalc::assemble(const std::string& table, CivInp& inp)
{ {
std::string utf8Table = CivCommonUtils::string_To_UTF8(table); std::string utf8Table = CivCommonUtils::string_To_UTF8(table);
......
...@@ -14,19 +14,17 @@ public: ...@@ -14,19 +14,17 @@ public:
/** /**
*@brief 水力模拟计算 *@brief 水力模拟计算
*@inpFile:inp文件
*@rptFile: 输出文件
*@binOutFile: 二进制输出文件
*@pviewprog: 回调函数
*/ */
bool simulation(const char* fileName); bool simulation(char* inpFile, char* rptFile, char* binOutFile, void (*pviewprog) (char*));
/**
*@brief 导出inp文件
*/
bool exportInp(const char* fileName);
/** /**
*@brief inp文件导入 *@brief 导出inp文件
*@fileName 文件名
*/ */
bool importInp(const char* fileName); bool exportInp(char* fileName);
private: private:
/** /**
*@brief 解析表字段名,按顺序写入 *@brief 解析表字段名,按顺序写入
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
int main(int argc, char* argv[]) 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); char* findUri = const_cast<char*>(uri);
CivHydrCalc* calc = new CivHydrCalc(findUri, std::string("ˮģ")); 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->exportInp(fileName);
calc->simulation(fileName); calc->simulation(fileName);
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hydraulicModel\Program\</OutDir> <OutDir>..\..\hModelProgram\Program\</OutDir>
<IncludePath>$(OUTDIR)..\include;$(IncludePath)</IncludePath> <IncludePath>$(OUTDIR)..\include;$(IncludePath)</IncludePath>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hydraulicModel\Program\</OutDir> <OutDir>..\..\hModelProgram\Program\</OutDir>
<IncludePath>$(IncludePath)</IncludePath> <IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath> <LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup> </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