#ifndef LOAD_LUA_DATA_H_INCLUDED
#define LOAD_LUA_DATA_H_INCLUDED

#include <unordered_map>

#include "specie.h"
#include "misc.h"
#include "trait.h"
#include "map.h"
#include "lua_wrapper.h"

/*
species createSpecieFromIndex(lua_State *L, int index);
individual * createIndFromIndex(lua_State *L, int index, vector<species *> pSpecieVect, landscape * pMap);
trait  get_trait_top(lua_State *L, vector<int> ploidy, std::string error_id);
ltypes get_type_on_top(lua_State *L, vector<int> ploidy, std::string error_id);
individual * load_ind_top(lua_State *L);
int load_populations(lua_State *L, string table_name, vector<species> & species_index, landscape & rMap);
*/

void load_species(lua_wrapper &state, string tableName, vector<species> &rVal);
species create_specie_top(lua_wrapper &state);
individual * createIndFromIndex(lua_wrapper &state, int index, vector<species *> pSpecieVect, landscape * pMap);
trait  get_trait_top(lua_wrapper &state, vector<int> ploidy, std::string error_id);
bool is_real_type(lua_wrapper &state);
ltypes get_type_on_top(lua_wrapper &state, vector<int> ploidy, std::string error_id);
individual * load_ind_top(lua_wrapper &state);
int load_populations(lua_wrapper &state, string table_name, vector<species> & species_index, landscape & rMap);


#endif // LOAD_LUA_DATA_H_INCLUDED
