/*************************************************************************
 *    CompuCell - A software framework for multimodel simulations of     *
 * biocomplexity problems Copyright (C) 2003 University of Notre Dame,   *
 *                             Indiana                                   *
 *                                                                       *
 * This program is free software; IF YOU AGREE TO CITE USE OF CompuCell  *
 *  IN ALL RELATED RESEARCH PUBLICATIONS according to the terms of the   *
 *  CompuCell GNU General Public License RIDER you can redistribute it   *
 * and/or modify it under the terms of the GNU General Public License as *
 *  published by the Free Software Foundation; either version 2 of the   *
 *         License, or (at your option) any later version.               *
 *                                                                       *
 * This program is distributed in the hope that it will be useful, but   *
 *      WITHOUT ANY WARRANTY; without even the implied warranty of       *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    *
 *             General Public License for more details.                  *
 *                                                                       *
 *  You should have received a copy of the GNU General Public License    *
 *     along with this program; if not, write to the Free Software       *
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
 *************************************************************************/

#include "MitosisPluginBiofilm.h"

#include <CompuCell3D/Simulator.h>
#include <CompuCell3D/Field3D/Field3D.h>
#include <CompuCell3D/Potts3D/Potts3D.h>
#include <CompuCell3D/Potts3D/Cell.h>
#include <CompuCell3D/Automaton/Automaton.h>


#include <CompuCell3D/Potts3D/Cell.h>

#include <XMLCereal/XMLPullParser.h>
#include <XMLCereal/XMLSerializer.h>

#include <BasicUtils/BasicString.h>
#include <BasicUtils/BasicException.h>



using namespace CompuCell3D;

#include <iostream>
using namespace std;
MitosisPluginBiofilm::MitosisPluginBiofilm():MitosisPlugin() {}

MitosisPluginBiofilm::~MitosisPluginBiofilm()
{}

// void MitosisPluginBiofilm::init(Simulator *simulator){
//    MitosisPlugin::init(simulator);
// }
// 
// void MitosisPluginBiofilm::field3DChange(const Point3D &pt, CellG *newCell,CellG *oldCell){
//    MitosisPlugin::field3DChange(pt,newCell,oldCell);
// }
// 
// void MitosisPluginBiofilm::step(){
//    MitosisPlugin::step();
// }
// 
// 
// void MitosisPluginBiofilm::turnOn(){
//    MitosisPlugin::turnOn();
// }
// void MitosisPluginBiofilm::turnOff(){
//    MitosisPlugin::turnOff();
// }
// 
//
//bool MitosisPluginBiofilm::doMitosis(){///actually make mitosis - returns true if mitosis was done , false otherwise
//   MitosisPlugin::doMitosis();
//}

void MitosisPluginBiofilm::updateAttributes(){

   ///copying type and target volume of the parent cell to the new cell
   childCell->type = parentCell->type;
   childCell->targetVolume = initialTargetVolume;
   parentCell->targetVolume = initialTargetVolume;
   childCell->targetSurface = initialTargetSurface;
   parentCell->targetSurface = initialTargetSurface;


/*   cerr<<"childCell->targetVolume ="<<childCell->targetVolume<<" parentCell->targetVolume ="<<parentCell->targetVolume<<endl;
   cerr<<"initialTargetVolume="<<initialTargetVolume<<endl;*/
}

// void MitosisPluginBiofilm::readXML(XMLPullParser &in) {
//    MitosisPlugin::readXML(in);
// }
// 
// void MitosisPluginBiofilm::writeXML(XMLSerializer &out) {
//    MitosisPlugin::writeXML(out);
// }
// 

















