class enumerate_atoms_etich_entry{
public:
  etichetta* _et;
  int _x;
  int _y;
  int _w;
  int _h;


  /*


   3 +----------+ 0
     |          |
     |          |
     |          |
   2 +----------+ 1

   */



  int _last_pos;

  static const int max_pos;
};




class enumerate_atoms: public bist_plugin{
public:
  enumerate_atoms(immagine* image, string libpath);
  virtual ~enumerate_atoms();

  virtual bool act(int e);


  virtual void register_plugin();
  virtual bool time_to_act();


  virtual bool need_atom();
  virtual bool need_leg();

  virtual string libpath();
  void inizialize();




protected:
  void enumerate();

  void update_pos(etichetta* et);

  int _curr_num;

  bool _has_to_act;
  bool _has_acted;

  std::vector<enumerate_atoms_etich_entry> _added;
 
};

extern "C" bist_plugin* create_plugin(immagine* imm, string libpath);
extern "C"  void destroy_plugin(bist_plugin* j);

