00001 /************************************************************************* 00002 * CompuCell - A software framework for multimodel simulations of * 00003 * biocomplexity problems Copyright (C) 2003 University of Notre Dame, * 00004 * Indiana * 00005 * * 00006 * This program is free software; IF YOU AGREE TO CITE USE OF CompuCell * 00007 * IN ALL RELATED RESEARCH PUBLICATIONS according to the terms of the * 00008 * CompuCell GNU General Public License RIDER you can redistribute it * 00009 * and/or modify it under the terms of the GNU General Public License as * 00010 * published by the Free Software Foundation; either version 2 of the * 00011 * License, or (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, but * 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU General Public License * 00019 * along with this program; if not, write to the Free Software * 00020 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00021 *************************************************************************/ 00022 00023 #ifndef AUTOMATON_H 00024 #define AUTOMATON_H 00025 00026 //#include <CompuCell3D/Potts3D/CellChangeWatcher.h> 00027 #include <CompuCell3D/Potts3D/Potts3D.h> 00028 #include "CellType.h" 00029 00030 #include <BasicUtils/BasicString.h> 00031 #include <BasicUtils/BasicException.h> 00032 #include <CompuCell3D/Potts3D/CellGChangeWatcher.h> 00033 #include <BasicUtils/BasicClassAccessor.h> 00034 #include <BasicUtils/BasicClassGroup.h> 00035 #include <CompuCell3D/plugins/CellType/CellTypeG.h> 00036 #include <iostream> 00037 00038 #include <string> 00039 //using namespace std; 00040 00041 namespace CompuCell3D { 00042 class Potts3D; 00043 class Cell; 00044 00045 class Automaton : public CellGChangeWatcher { 00046 00047 protected: 00048 Potts3D* potts; 00049 00050 CellType* classType; 00051 00052 public: 00053 Automaton() {} 00054 00055 virtual ~Automaton() {if (classType) delete classType;}; 00056 00057 00058 virtual void creation(CellG* newCell) {} 00059 virtual void updateVariables(CellG* newCell) {} 00060 00061 virtual void field3DChange(const Point3D &pt, CellG *newCell, 00062 CellG *oldCell); 00063 00064 00065 00066 virtual unsigned char getCellType(const CellG*) const =0; 00067 virtual std::string getTypeName(const char type) const =0; 00068 virtual unsigned char getTypeId(const std::string typeName) const =0; 00069 }; 00070 }; 00071 #endif
1.5.6