#pragma once
#ifndef CartoBaseDef_H
#define CartoBaseDef_H
#include "base_head.h"

namespace CartoBaseTypes{
 enum {
    Ndef = 0,
	Point,
	Line
	};
};

//calse coleccion de puntos (double[3]) solo lectura
class UTILES_EXPORT SetPtsR
{
public:
	virtual double* getPto(int i)=0;//devuelve el punto iesimo
	virtual int getNumberPtos()=0;//devuelve numero de puntos totales
};
//coleccion de puntos al que se le puede aņadir mas
class UTILES_EXPORT SetPtsW
{
public:
	virtual bool addPto(double* p)=0;//aņade el punto p al conjunto
};
//constructor de setPtsW
class UTILES_EXPORT SetPtsWBuilder
{
public:
	virtual SetPtsW *build()=0;//devuelve una nueva clase SetPtsW
};
class CartoBase;
//interface de ia
class UTILES_EXPORT DataIaCartoBase
{
public:
	virtual void* IaGet(int refEnt){return NULL;}

	virtual void CBSet(CartoBase* cb){}
	virtual void IaRemove(int refEnt){}
	virtual void IaRemoveAll(){}
	virtual void IaAdd(int refEnt){}

	//informa del numero de filas y columnas que tiene la ia
	virtual bool IaSet(int nrow, int ncolm){return true;}
	virtual bool IaSetColm(int icol, char* name, BYTE type, int size){return true;}
	virtual bool IaAddVal(int refEnt, int icol, int v){return true;}
	virtual bool IaAddVal(int refEnt, int icol, double v){return true;}
	virtual bool IaAddVal(int refEnt, int icol, __int64 v){return true;}
	virtual bool IaAddVal(int refEnt, int icol, char* v){return true;}
	virtual bool IaAddVal(int refEnt, int icol, void* v){return true;}
	virtual bool IaFinRow(int refEnt){return true;}
	virtual bool IaFinR(){return true;}
	
	
	virtual bool IaGetSize( int *ncolm ){return false;}
	virtual bool IaGetColm( int icol, char* name, BYTE *type, int *size, int*ndecimal ){return false;}
	virtual bool IaGetVal( int refEnt, int icol, int* v ){return false;}
	virtual bool IaGetVal( int refEnt, int icol, double* v ){return false;}
	virtual bool IaGetVal( int refEnt, int icol, __int64* v ){return false;}
	virtual bool IaGetVal( int refEnt, int icol, char** v ){return false;}
	virtual bool IaGetVal( int refEnt, int icol, void** v ){return false;}
	virtual bool IaFinW(){return true;}
};

#define TYPE_FILE	"CartoBase"
#define VERSION_CART_BASE	100
//falgs de entidades--------------
#define CARTOBASE_DELETED_ENTITY	0x01



#endif

