#pragma once

#ifndef IaDataTable_h
#define IaDataTable_h
#include "gdatatable.h"
#include "base_head.h"
#include "CartoBaseDef.h"
#include <map>
class CartoBase;
//tabla de datos para albergar informacion asiciada generica (diseņada para el cartobase)
class UTILES_EXPORT IaDataTable :
	public GdataTable, public DataIaCartoBase
{
	std::map<int, int> RefIndex;//indexado por referencias;
	std::map<int, int> rowIndex;//indexado por filas;
	CartoBase* _cb; 
	int auxnrow,auxcolm,auxref,auxc;
public:
	IaDataTable(void);
	~IaDataTable(void);

	virtual void* IaGet( int refEnt );
	virtual void CBSet( CartoBase* cb );
	virtual void IaRemove( int refEnt );
	virtual void IaRemoveAll();
	virtual void IaAdd( int refEnt );
	virtual bool IaSet( int nrow, int ncolm );
	virtual bool IaSetColm( int icol, char* name, BYTE type, int size );
	virtual bool IaAddVal( int refEnt, int icol, int v );
	virtual bool IaAddVal( int refEnt, int icol, double v );
	virtual bool IaAddVal( int refEnt, int icol, __int64 v );
	virtual bool IaAddVal( int refEnt, int icol, char* v );
	virtual bool IaAddVal( int refEnt, int icol, void* v );
	virtual bool IaFinRow( int refEnt );
	virtual bool IaFinR();
	virtual bool IaGetSize( int *ncolm );
	virtual bool IaGetColm( int icol, char* name, BYTE *type, int *size, int*ndecimal );
	virtual bool IaGetVal( int refEnt, int icol, int* v );
	virtual bool IaGetVal( int refEnt, int icol, double* v );
	virtual bool IaGetVal( int refEnt, int icol, __int64* v );
	virtual bool IaGetVal( int refEnt, int icol, char** v );
	virtual bool IaGetVal( int refEnt, int icol, void** v );
	virtual bool IaFinW();
};
#endif