#include "CivHydDataType.h"

bool operator==(const CivGraphEdage& left, const CivGraphEdage& right)
{
	return left.mSN == right.mSN;
}

bool operator==(const CivGraphJunction& left, const CivGraphJunction& right) {
	return left.mSN == right.mSN;
}

CivGraphJunction::CivGraphJunction()
{

}

CivGraphJunction::CivGraphJunction(std::string sN)
	: mSN(sN)
{

}

CivGraphJunction::CivGraphJunction(std::string sN, std::string xCoord, std::string yCoord)
	:mSN(sN),mXCoord(xCoord),mYCoord(yCoord)
{

}

bool CivGraphJunction::operator== (const CivGraphJunction& edage)
{
	return mSN == edage.mSN;
}


CivGraphEdage::CivGraphEdage()
{
}

 CivGraphEdage::CivGraphEdage(std::string sn, std::string length, std::vector<std::string> position)
{
	 mSN = sn;
	 mLength = length;
	 if (position.size() != 4)
		 return;

	 
	 mStartX = position[0];
	 mStartY = position[1];
	 mEndX = position[2];
	 mEndY = position[3];
}

bool CivGraphEdage::operator== (const CivGraphEdage& edage)
{
	return mSN == edage.mSN;
}

bool CivGraphEdage::operator> (const CivGraphEdage& edage)
{
	return mLength > edage.mLength;
}

bool CivGraphEdage::operator< (const CivGraphEdage& edage)
{
	return mLength < edage.mLength;
}

bool  CivGraphEdage::operator!= (const CivGraphEdage& edage)
{
	return mLength != edage.mLength;
}