[Avida-SVN] r2701 - in branches/uml-merge: Avida.xcodeproj source/cpu source/main source/orchid

dk at myxo.css.msu.edu dk at myxo.css.msu.edu
Wed Jul 2 08:09:52 PDT 2008


Author: dk
Date: 2008-07-02 11:09:51 -0400 (Wed, 02 Jul 2008)
New Revision: 2701

Modified:
   branches/uml-merge/Avida.xcodeproj/project.pbxproj
   branches/uml-merge/source/cpu/cHardwareOrchid.h
   branches/uml-merge/source/main/cPopulation.cc
   branches/uml-merge/source/orchid/cOrchidFactory.cc
   branches/uml-merge/source/orchid/cOrchidFactory.h
Log:
Comments, unit test fixes.

Modified: branches/uml-merge/Avida.xcodeproj/project.pbxproj
===================================================================
--- branches/uml-merge/Avida.xcodeproj/project.pbxproj	2008-07-02 14:43:52 UTC (rev 2700)
+++ branches/uml-merge/Avida.xcodeproj/project.pbxproj	2008-07-02 15:09:51 UTC (rev 2701)
@@ -1948,6 +1948,7 @@
 		DCC30C4D0762532C008F7A48 /* Project object */ = {
 			isa = PBXProject;
 			buildConfigurationList = 702442D70859E0B00059BD9B /* Build configuration list for PBXProject "Avida" */;
+			compatibilityVersion = "Xcode 2.4";
 			hasScannedForEncodings = 0;
 			mainGroup = DCC30C490762532C008F7A48;
 			productRefGroup = DCC3164E07626CF3008F7A48 /* Products */;

Modified: branches/uml-merge/source/cpu/cHardwareOrchid.h
===================================================================
--- branches/uml-merge/source/cpu/cHardwareOrchid.h	2008-07-02 14:43:52 UTC (rev 2700)
+++ branches/uml-merge/source/cpu/cHardwareOrchid.h	2008-07-02 15:09:51 UTC (rev 2701)
@@ -800,7 +800,7 @@
 
 
 #ifdef ENABLE_UNIT_TESTS
-namespace nHardwareCPU {
+namespace nHardwareOrchid {
   /**
    * Run unit tests
    *

Modified: branches/uml-merge/source/main/cPopulation.cc
===================================================================
--- branches/uml-merge/source/main/cPopulation.cc	2008-07-02 14:43:52 UTC (rev 2700)
+++ branches/uml-merge/source/main/cPopulation.cc	2008-07-02 15:09:51 UTC (rev 2701)
@@ -253,7 +253,7 @@
   
   // Now we're going to check to see if we should initialize Orchid.
   // Although Orchid does not currently utilize demes, the expectation is that
-  // each deme could support its own cOrchidPopulationInterface.
+  // each deme could support its own cOrchidPopulation.
   if(m_world->GetConfig().ENABLE_ORCHID.Get()) {
     m_orchid = cOrchidFactory::BuildOrchidPopulation(m_world);
   }

Modified: branches/uml-merge/source/orchid/cOrchidFactory.cc
===================================================================
--- branches/uml-merge/source/orchid/cOrchidFactory.cc	2008-07-02 14:43:52 UTC (rev 2700)
+++ branches/uml-merge/source/orchid/cOrchidFactory.cc	2008-07-02 15:09:51 UTC (rev 2701)
@@ -4,17 +4,34 @@
 #include "cPopulation.h"
 #include "cWorld.h"
 
+
+/*! This method is called from cBirthChamber::DoAsexBirth, and is used to initialize
+ an orchid organism from its parent.  It must return a pointer to a new cOrchidOrganism 
+ (e.g., return new cOrchidOrganism(...)).  The resulting pointer is owned by the caller.
+ 
+ NOTE: I suspect that parent will be null for the ancestor... not sure about this.
+ */
 cOrchidOrganism* cOrchidFactory::BuildOrchidOrganism(cOrchidOrganism* parent) 
 {
+  // This code used to live in cBirthChamber:
+  
   // For orchid -- provides the offspring with information about its parent's model.
-//  child_array[0]->SetParentXMI(parent.GetUMLModel()->GetXMI());
-//  child_array[0]->SetParentBonus(parent.GetParentBonus());  
-//  child_array[0]->SetParentScenarioCompletion(parent.GetUMLModel()->GetScenarioCompletion());
+  //  child_array[0]->SetParentXMI(parent.GetUMLModel()->GetXMI());
+  //  child_array[0]->SetParentBonus(parent.GetParentBonus());  
+  //  child_array[0]->SetParentScenarioCompletion(parent.GetUMLModel()->GetScenarioCompletion());
   
   return 0;
 }
 
 
+/*! This method is called from cPopulation::cPopulation, and is used to initialize
+ the orchid population.  This is an ideal place to put one-time population-wide
+ initialization code.  It must return a pointer to a new cOrchidPopulation (e.g.,
+ return new cOrchidPopulation(...)).  The resulting pointer is owned by the caller.
+ 
+ NOTE: We need to extend cOrchidOrganisms with a pointer to the cOrchidPopulation in which
+ it lives.  Will probably have to touch BuildOrchidOrganism to get that to work...
+ */
 cOrchidPopulation* cOrchidFactory::BuildOrchidPopulation(const cWorld* world) 
 {
   return 0;

Modified: branches/uml-merge/source/orchid/cOrchidFactory.h
===================================================================
--- branches/uml-merge/source/orchid/cOrchidFactory.h	2008-07-02 14:43:52 UTC (rev 2700)
+++ branches/uml-merge/source/orchid/cOrchidFactory.h	2008-07-02 15:09:51 UTC (rev 2701)
@@ -10,7 +10,9 @@
 class cOrchidFactory
 {
 public:
+  //! Build an OrchidOrganism from its parent.
   static cOrchidOrganism* BuildOrchidOrganism(cOrchidOrganism* parent);
+  //! Build an OrchidPopulation.
   static cOrchidPopulation* BuildOrchidPopulation(const cWorld* world);
 };
 




More information about the Avida-cvs mailing list