#ifndef CELL_H
#define CELL_H


#include <iostream>
#include <string>
#include <vector>

#include "population.h"
#include "event.h"

class population;
class species;
class individual;

//void fail(string error);

class cell
{
/*
 * 22/07/15: The way the program evolved, this class is no longer useful
 * 
 */
    public:
        cell(int myLati, int myLongi, int myAbs);
        virtual ~cell();

        void add_population(population * pPop);
        void add_individual(individual * pInd, species * pSpe);

        population * get_pop(species * pSpe);
        pair<int, int> get_position();
        inline int get_abs_pos();
        int get_loc(species * pSpe);
        //void set_insectStrength(float iS);
        //float get_insectStrength();
        vector<EventOccur> get_events();
        void add_event(EventOccur e);
        void reset_events();

        const int lati;
        const int longi;
        const int abs; // one dim location

    protected:
    private:
        vector<population*> index_pop;
        vector<EventOccur> events;
        //float insectStrength = 0;
};

inline int cell::get_abs_pos()
{
    return abs;
}


#endif // CELL_H
