[avida-cvs] avida CVS commits: /current configure.in /current/source defs.hh /current/source/event population_event_factory.cc population_event_factory.hh /current/source/main config.cc /current/source/support genesis
kaben
avida-cvs at alife.org
Thu Oct 16 01:45:16 PDT 2003
kaben Wed Oct 15 17:45:16 2003 EDT
Modified files:
/avida/current configure.in
/avida/current/source defs.hh
/avida/current/source/event population_event_factory.cc
population_event_factory.hh
/avida/current/source/main config.cc
/avida/current/source/support genesis
Log:
Again, fix Wagenaar's bug of missing event files.
Index: avida/current/configure.in
diff -u avida/current/configure.in:1.33 avida/current/configure.in:1.34
--- avida/current/configure.in:1.33 Fri Oct 3 14:48:15 2003
+++ avida/current/configure.in Wed Oct 15 17:45:15 2003
@@ -8,7 +8,7 @@
dnl ****************************************
dnl Package name and version
dnl ****************************************
-AM_INIT_AUTOMAKE(avida, 2.0b6)
+AM_INIT_AUTOMAKE(avida, 2.0b7)
dnl ****************************************
@@ -199,7 +199,6 @@
source/event/Makefile source/viewers/Makefile
source/main/Makefile
source/main/functional_testsuites/Makefile
- source/main/unit_testsuites/Makefile
source/support/Makefile
source/support/preset_organisms/Makefile
source/qt-viewer/Makefile
Index: avida/current/source/defs.hh
diff -u avida/current/source/defs.hh:1.33 avida/current/source/defs.hh:1.34
--- avida/current/source/defs.hh:1.33 Thu Sep 25 16:26:29 2003
+++ avida/current/source/defs.hh Wed Oct 15 17:45:16 2003
@@ -75,7 +75,7 @@
// the macro VERSION is defined by automake (in the file 'configure.in' in
// the top-level directory).
#ifndef VERSION
- #define VERSION "2.0b6"
+ #define VERSION "2.0b7"
#endif
#define AVIDA_VERSION VERSION
Index: avida/current/source/event/population_event_factory.cc
diff -u avida/current/source/event/population_event_factory.cc:1.7 avida/current/source/event/population_event_factory.cc:1.8
--- avida/current/source/event/population_event_factory.cc:1.7 Thu Aug 7 20:24:18 2003
+++ avida/current/source/event/population_event_factory.cc Wed Oct 15 17:45:16 2003
@@ -1,101 +1,56 @@
+#ifndef AVIDA_EVENT_FACTORY_HH
+#define AVIDA_EVENT_FACTORY_HH
-#include <fstream>
+#ifndef DEFS_HH
+#include "../defs.hh"
+#endif
-#include "population_event_factory.hh"
+#ifndef EVENT_FACTORY_HH
+#include "./event_factory.hh"
+#endif
+#ifndef EVENT_HH
+#include "./event.hh"
+#endif
-#include <ctype.h> // for isdigit
+class cPopulation;
-#include "../tools/string_util.hh"
+class cPopulationEvent : public cEvent {
+private:
+ // not implemented. prevents inadvertend wrong instantiation.
+ cPopulationEvent();
+ cPopulationEvent( const cPopulationEvent & );
+ const cPopulationEvent& operator=( cPopulationEvent & );
-#include "../main/analyze_util.hh"
-#include "../main/avida.hh"
-#include "../main/config.hh"
-#include "../main/genebank.hh"
-#include "../main/genotype.hh"
-#include "../cpu/hardware_method.hh"
-#include "../main/inject_genebank.hh"
-#include "../main/inject_genotype.hh"
-#include "../main/inst_util.hh"
-#include "../main/landscape.hh"
-#include "../main/lineage_control.hh"
-#include "../main/organism.hh"
-#include "../main/phenotype.hh"
-#include "../main/population.hh"
-#include "../main/population_cell.hh"
-#include "../main/stats.hh"
-#include "../main/tasks.hh"
+
+protected:
+ cPopulation *population;
+
+public:
+ cPopulationEvent(const cString & name, const cString & args);
-#include "../cpu/test_cpu.hh"
-#include "../cpu/test_util.hh"
+ void SetPopulation( cPopulation *pop ){ population = pop; }
+};
-#include "../viewers/symbol_util.hh"
+class cPopulationEventFactory : public cEventFactory {
+private:
+ cPopulation *m_population;
-using namespace std;
+public:
+ // event enums
+#include "../event/cPopulation_enums_auto.ci"
-/////////////////
-// cAvidaEvent
-/////////////////
+ cPopulationEventFactory( cPopulation *pop );
+ ~cPopulationEventFactory();
-cPopulationEvent::cPopulationEvent(const cString & name, const cString & args):
- cEvent(name, args)
-{
-}
+ int EventNameToEnum(const cString & name) const;
+ cEvent * ConstructEvent(int event_enum, const cString & args );
+};
-/////////////////
-// events derived from cPopulationEvent (autogenerated code)
-/////////////////
-
-// The Process() functions
-using namespace std;
-#include "cPopulation_process_auto.ci"
-
-// EventNameToEnum()
-#include "cPopulation_name2enum_auto.ci"
-
-
-/////////////////
-// cPopulationEventFactory
-/////////////////
-
-cPopulationEventFactory::cPopulationEventFactory( cPopulation *pop )
- : m_population( pop )
-{
-}
-
-cPopulationEventFactory::~cPopulationEventFactory()
-{
-}
-
-//******* construction of events **********//
-cEvent *
-cPopulationEventFactory::ConstructEvent( int event_enum,
- const cString & arg_list )
-{
- cPopulationEvent *event = NULL;
-
- switch (event_enum){
-
-#include "cPopulation_construct_event_auto.ci"
-
- default:
- event = NULL;
- break;
- }
-
- if( event != NULL ){
- // Have to setup the base class variables
- event->SetFactoryId( GetFactoryId() );
-
- assert( m_population != NULL );
- event->SetPopulation( m_population );
- }
- return event;
-}
-
+#endif
Index: avida/current/source/event/population_event_factory.hh
diff -u avida/current/source/event/population_event_factory.hh:1.1 avida/current/source/event/population_event_factory.hh:1.2
--- avida/current/source/event/population_event_factory.hh:1.1 Thu Jul 19 12:24:29 2001
+++ avida/current/source/event/population_event_factory.hh Wed Oct 15 17:45:16 2003
@@ -40,7 +40,7 @@
public:
// event enums
-#include "cPopulation_enums_auto.ci"
+#include "../event/cPopulation_enums_auto.ci"
cPopulationEventFactory( cPopulation *pop );
~cPopulationEventFactory();
Index: avida/current/source/main/config.cc
diff -u avida/current/source/main/config.cc:1.61 avida/current/source/main/config.cc:1.62
--- avida/current/source/main/config.cc:1.61 Mon Oct 13 10:34:26 2003
+++ avida/current/source/main/config.cc Wed Oct 15 17:45:16 2003
@@ -10,8 +10,8 @@
#include "config.hh"
#include "../tools/tools.hh"
-#include "cPopulation_descr.hi" // declarations and definitions
-#include "cPopulation_descr.ci" // for event documentation
+#include "../event/cPopulation_descr.hi" // declarations and definitions
+#include "../event/cPopulation_descr.ci" // for event documentation
using namespace std;
Index: avida/current/source/support/genesis
diff -u avida/current/source/support/genesis:1.43 avida/current/source/support/genesis:1.44
--- avida/current/source/support/genesis:1.43 Wed Sep 24 01:12:07 2003
+++ avida/current/source/support/genesis Wed Oct 15 17:45:16 2003
@@ -3,7 +3,7 @@
# For more information, see doc/genesis.html
#############################################################################
-VERSION_ID 2.0b6 # Do not change this value!
+VERSION_ID 2.0b7 # Do not change this value!
### Architecture Variables ###
MAX_UPDATES -1 # Maximum updates to run simulation (-1 = no limit)
More information about the Avida-cvs
mailing list