#ifndef COMPUCELL3DEXTERNALPOTENTIALPLUGIN_H
#define COMPUCELL3DEXTERNALPOTENTIALPLUGIN_H

#include <CompuCell3D/Plugin.h>
#include <CompuCell3D/Potts3D/CellGChangeWatcher.h>
#include <BasicUtils/BasicClassAccessor.h>
#include <CompuCell3D/Potts3D/Cell.h>
#include "ExternalPotentialEnergy.h"
#include <CompuCell3D/Field3D/AdjacentNeighbor.h>


namespace CompuCell3D {

/**
@author m
*/

class Simlator;
class Potts3D;



class ExternalPotentialPlugin : public Plugin, public CellGChangeWatcher
{
   public:
      ExternalPotentialPlugin();

      ~ExternalPotentialPlugin();
       virtual void init(Simulator *_simulator);

       // BCGChangeWatcher interface
      virtual void field3DChange(const Point3D &pt, CellG *newCell,
                               CellG *oldCell){};

      // Begin XMLSerializable interface
      virtual void readXML(XMLPullParser &in);
      virtual void writeXML(XMLSerializer &out){};
   
   private:
      //Simulator *simulator;
      Potts3D *potts;
      ExternalPotentialEnergy  externalPotentialEnergy;
      //AdjacentNeighbor  *adjNeighbor_ptr;
      AdjacentNeighbor  adjNeighbor;
};

};

#endif
