#pragma once
#include <string>

#include <vector>

/**
    节点
*/
class  CivGraphJunction
{
public:
	CivGraphJunction();

	CivGraphJunction(std::string sN);
	CivGraphJunction(std::string sN, std::string xCoord, std::string yCoord);

	bool operator== (const CivGraphJunction& j1);

	friend bool operator==(const CivGraphJunction& left, const CivGraphJunction& right); 

	void setSn(const std::string& sn) { mSN = sn; }
	std::string getSn() { return mSN; }

	void setXCoord(const std::string& xCoord) { mXCoord = xCoord; }
	std::string getXCoord() { return mXCoord; }

	void setYCoord(const std::string& yCoord) { mXCoord = yCoord; }
	std::string getYCoord() { return mYCoord; }

	void setHead(float head) { mHead = head; }
	float getHead() { return mHead; }

private:
	std::string mSN; // 本点号,
	float mHead; // 高程
	std::string mXCoord; // 横坐标
	std::string mYCoord; // 纵坐标
};

/*
	边
*/
class CivGraphEdage
{
public:
	/**
	*@brief 边构造函数
	*@param sn 编号,
	*@param length 管长
	*@param position 注意顺序，[length, startx, starty, endx, endy]
	*/
	CivGraphEdage();
	CivGraphEdage(std::string sn, std::string length, std::vector<std::string> position);

	friend bool operator==(const CivGraphEdage& left, const CivGraphEdage& right);
	bool operator== (const CivGraphEdage& edage);
	bool operator> (const CivGraphEdage& edage);
	bool operator< (const CivGraphEdage& edage);
	bool operator != (const CivGraphEdage& edage);

	std::string getLength() { return mLength; }
	std::string getSN() { return mSN; }
	std::string getStartX() { return mStartX; }
	std::string getStartY() { return mStartY; }
	std::string getEndX() { return mEndX; }
	std::string getEndY() { return mEndY; }

	void setLength(const std::string& length) {  mLength = length; }
	void setSN(const std::string& sn) {  mSN = sn; }
	void setStartX(const std::string& startX) {  mStartX = startX; }
	void setStartY(const std::string& startY) {  mStartY = startY; }
	void setEndX(const std::string& endX) {  mEndX = endX; }
	void setEndY(const std::string& endY) {  mEndY = endY; }

private:
	std::string mSN;// 编号
	std::string mLength; // 管长
	std::string mStartX;
	std::string mStartY;
	std::string mEndX;
	std::string mEndY;
};


