#pragma once
#include<string>
#include<map>

struct ResultItem
{
	std::string code;
	char szNo[64];
	std::string dDate;
	std::string dTime;
	float dQuality;
	std::string dModifyTime;
};

// 节点结果模拟值
struct NodeResultItem:public ResultItem
{
	float dHead;
	float dPressure;
	float dElevation;
	float dDemand;	
};

// 管段结果模拟值
struct LinkResultItem:public ResultItem
{
	char szStatus[32];
	float dFlow;
	float dVelocity;
	float dHeadloss;// 单位水损
};

// 水池
struct TankResultItem :public ResultItem
{	
	float dTankVolume;
	float dTankMaxVolume;
	float dTankLevel;
};

#define NodeResultItems std::map<std::string,NodeResultItem> 
#define LinkResultItems std::map<std::string,LinkResultItem> 
#define TankResultItems std::map<std::string,TankResultItem>

// 节点
typedef struct NodeCoord
{
	std::string xCoord; // x坐标
	std::string yCoord; // y坐标
} NodeCoord;

// 管段
typedef struct PipeCoord
{
	std::string startX; // 起始节点x
	std::string startY; // 起始节点Y
	std::string endX;// 终止节点X
	std::string endY;// 终止节点Y
}PipeCoord;

#define NodeCoords std::map<std::string,NodeCoord>
#define PipeCoords std::map<std::string,PipeCoord>

