#pragma once
#include "base_head.h"
#include "garray.h"
#include "CartoBase.h"

class Cb_file;
class Fshape;
//clase helper para inportacion de shp a un carto base
class UTILES_EXPORT CartoBaseShpManager
{
	CartoBase* cad;
	bool ImportPoints(Fshape *shp);
	bool Importline(Fshape *shp);	
	bool ImportPoligon(Fshape *shp);	
	bool ExportLine(Cb_file *file, Cb_file *fshx, SetEntities *entities);
	bool ExportPts(Cb_file *file, Cb_file *fshx, SetEntities *entities);
	
public:
	CartoBaseShpManager(void);
	~CartoBaseShpManager(void);

	void set(CartoBase* cb){cad = cb;}

	bool ImportShp(Cb_file *file);

	bool ExportShp(Cb_file *file,Cb_file *fshx, SetEntities *entities, int type = CartoBaseTypes::Ndef);

};
