/******************************************************************************  		
 * Company:         SINED GmbH
 * Author:          Vladimir Bobko
 * Created:         13.12.2004
 * Last modified:   $Modtime: 29.04.07 23:09 $
 * Purpose:         Exceptions of the library
 ******************************************************************************/

#ifndef POLYGONLIBRARY_INVALIDPOLYGONEXEPTIONS_H
#define POLYGONLIBRARY_INVALIDPOLYGONEXEPTIONS_H

#include "../../Collections/Exception.h"

namespace PolygonLibrary
{
	
	class InvalidPolygonException: public Exceptions::Exception
	{
	public:
		InvalidPolygonException(const char* szMessage, const char* szSource): Exceptions::Exception(szMessage, szSource)
		{
		}
	};
	
	
	class InvalidRingException: public InvalidPolygonException
	{
	public:
		InvalidRingException(const char* szMessage, const char* szSource): InvalidPolygonException(szMessage, szSource)
		{
		}
	};
	
	class Ring;
	class SelfIntersectingRingException: public InvalidRingException
	{
	public:
		SelfIntersectingRingException(const char* szMessage, const char* szSource, Ring* pRing): InvalidRingException(szMessage, szSource), m_pRing(pRing)
		{
		}
		Ring* GetRing() {return m_pRing;}
	private:
		Ring* m_pRing;
	};


	class PolygonsOverlapException: public Exceptions::Exception
	{
	public:
		PolygonsOverlapException(const char* szMessage, const char* szSource): Exceptions::Exception(szMessage, szSource)
		{
		}
	};

}

#endif