/////////////////////////////////////////////////////////////////////////////
// Class of nodes
class CPartic;

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;
  	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 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 CTimeInt:public CObject
{
public:
	CTimeInt (float tim);
	~CTimeInt();
	CPartic* AddParts(float x,float y);
	CPartic* GetPartic(int i);
	virtual void Serialize (CArchive& ar);  	
	
protected:
	CTimeInt();
  	DECLARE_SERIAL (CTimeInt);
	
public:
	float tim;
	CObArray Parts;
};

////////////////////////////////////////////////
// Class of particle
class CPartic:public CObject
{
public:
	CPartic (float x,float y);
	CPartic (CPoint p,float *gc);
	
protected:
	CPartic();
  	DECLARE_SERIAL (CPartic);
	
public:
  	BOOL operator ==(const CPartic& other) const;
  	void TranCoord (float *gcb);
  	void RevTran (float *gcb);
  	void Coord (float& x,float& y);
  	CPoint Coord(void);
public:
	float xb,yb;
	int xi,yi,flg;  	
public:
	void Plot (CDC& dc, float *gc, COLORREF clr);
	virtual void Serialize (CArchive& ar);  	
};

