/////////////////////////////////////////////////////////////////////////////
// Class of nodes
class CNode:public CObject
{
public:
	CNode (float x,float y);
	CNode (CPoint p,float *gc);
	
protected:
	CNode();
  	DECLARE_SERIAL (CNode);
	
public:
  	BOOL operator ==(const CNode& other) const;
  	void TranCoord (float *gcb);
  	void RevTran (float *gcb);
  	int IsEqu (CPoint p,float *gc);
  	void PlotNode (CDC *dc,int i,int vel,float *gc);
  	void Coord (float& x,float& y);
  	CPoint Coord(void);
  	void Bound(int i);          
	void Mult (float n);
public:
	float xb,yb;
	int xi,yi,ok;  	
public:
	virtual void Serialize (CArchive& ar);  	
};
////////////////////////////////////////////////////////////////////////////
//  Class of elements
class CElement:public CObject
{
public:
	CElement (int u1,int u2);
protected:
	CElement();
  	DECLARE_SERIAL (CElement);
public:
	int nod1,nod2,type;
	float pot,der,tim,level,kf0,dist;    
public:
	virtual void Serialize (CArchive& ar);  	
};	    

///////////////////////////////////////////////////////////	  	
// Class of wells
class CWell:public CObject
{
public:
  CWell (CString s,CPoint p, float *gc,float dis, float d);
  CWell (CString s,float x,float y,float *gc,float dis,float d);

protected:
  	CWell ();
  	DECLARE_SERIAL (CWell);
  
public:
  	int xi,yi,izm;
  	float xz,yz,yield,diam,drwdown;
  	CString name;
  	BOOL operator ==(const CWell& other) const;
  	int IsEqu (CPoint p,float *gc);
  	void TranCoord (float *gcb);
  	void RevTran (float *gcb);
  	CPoint GetCoord();
public:
	void Plot (CDC *pDC,float *gc,int sz);
	virtual void Serialize (CArchive& ar);  	
};
	  	    
///////////////////////////////////////////////////////////	  	
// Class of internal points
class CIntPoint:public CObject
{
public:
  CIntPoint (CPoint p, float *gc);
  CIntPoint (float x,float y,float *gc);

protected:
  	CIntPoint ();
  	DECLARE_SERIAL (CIntPoint);
  
public:
  	int xi,yi;
  	float xz,yz,drwdown,vx,vy;
  	BOOL operator ==(const CIntPoint& other) const;
  	int IsEqu (CPoint p,float *gc);
  	void TranCoord (float *gcb);
  	void RevTran (float *gcb);
  	CPoint GetCoord();
public:
	virtual void Serialize (CArchive& ar);  	
	void PlotPt (CDC *DC,int ib,int vel,float *gc);
};
	  	    
///////////////////////////////////////////////////////////	  	
// Class of temporary points
class PPoint:public CObject
{
public:
	PPoint (int x,int y);
	POINT GetCoord();
protected:
	PPoint();
public:
	int xi,yi;
};			

///////////////////////////////////////////////////////////	  	
// Class of internal elements
class CIntElem:public CObject
{
public:
  CIntElem (float *x,float *y,float prec);

protected:
  	CIntElem ();
  	DECLARE_SERIAL (CIntElem);
  
public:                     
	float xp[3],yp[3],precip;
	int nodes[3];
public:
	virtual void Serialize (CArchive& ar);  	
};

///////////////////////////////////////////////////////////	  	
// Class of lines
class CLine:public CObject
{
public:
  	CLine (float w,float x1,float y1,float x2,float y2);
	void Kresli (CDC& td,float *gc);
	
protected:
  	CLine ();
  	DECLARE_SERIAL (CLine);
  	
public:
	float xb1,yb1,xb2,yb2,w;
	int ix1,iy1,ix2,iy2,ip,cok;
	
public:
	virtual void Serialize (CArchive& ar);  	
	void trancor (float *gc);
	void Plot (CDC& td,float *gc);
};	
