[Avida-SVN] r3520 - in branches/topology-manager: Avida.xcodeproj source/main
brysonda at myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Mon Nov 2 07:25:07 PST 2009
Author: brysonda
Date: 2009-11-02 10:25:06 -0500 (Mon, 02 Nov 2009)
New Revision: 3520
Modified:
branches/topology-manager/Avida.xcodeproj/project.pbxproj
branches/topology-manager/source/main/cTopoElement.h
branches/topology-manager/source/main/cTopologyManager.h
branches/topology-manager/source/main/cWorld.cc
branches/topology-manager/source/main/cWorld.h
Log:
Fix a circular include problem.
Modified: branches/topology-manager/Avida.xcodeproj/project.pbxproj
===================================================================
--- branches/topology-manager/Avida.xcodeproj/project.pbxproj 2009-11-01 21:08:42 UTC (rev 3519)
+++ branches/topology-manager/Avida.xcodeproj/project.pbxproj 2009-11-02 15:25:06 UTC (rev 3520)
@@ -37,6 +37,7 @@
700D9C470F1A8F34002CC711 /* cModularityAnalysis.cc in Sources */ = {isa = PBXBuildFile; fileRef = 700D9C450F1A8F34002CC711 /* cModularityAnalysis.cc */; };
700E2996085A1F6000CF158A /* avida in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCC3164D07626CF3008F7A48 /* avida */; };
700E2B87085DE54400CF158A /* avida-viewer in CopyFiles */ = {isa = PBXBuildFile; fileRef = 700E2B83085DE50C00CF158A /* avida-viewer */; };
+ 70197438109F303E0009BF3F /* cTopologyManager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 70197435109F30330009BF3F /* cTopologyManager.cc */; };
7020828F0FB9F2DF00637AD6 /* cBitArray.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7020828D0FB9F2DF00637AD6 /* cBitArray.cc */; };
702082900FB9F2DF00637AD6 /* cBitArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 7020828E0FB9F2DF00637AD6 /* cBitArray.h */; };
70211A5D0ECBD531004A293A /* cRCObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 70211A5B0ECBD531004A293A /* cRCObject.h */; };
@@ -427,6 +428,11 @@
7013846009028B3E0087ED2E /* cAvidaConfig.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAvidaConfig.cc; sourceTree = "<group>"; };
701384A10902A16F0087ED2E /* defs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = defs.h; sourceTree = "<group>"; };
70166B8D0B519CFE009533A5 /* cTaskState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTaskState.h; sourceTree = "<group>"; };
+ 70197433109F30330009BF3F /* cDemeInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cDemeInterface.h; sourceTree = "<group>"; };
+ 70197434109F30330009BF3F /* cTopoElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTopoElement.h; sourceTree = "<group>"; };
+ 70197435109F30330009BF3F /* cTopologyManager.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cTopologyManager.cc; sourceTree = "<group>"; };
+ 70197436109F30330009BF3F /* cTopologyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTopologyManager.h; sourceTree = "<group>"; };
+ 70197437109F30330009BF3F /* cTopologyManagerChildInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTopologyManagerChildInterface.h; sourceTree = "<group>"; };
701D51CB09C645F50009B4F8 /* cAvidaContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAvidaContext.h; sourceTree = "<group>"; };
701D9116094B773E008B845F /* cWorldDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cWorldDriver.h; sourceTree = "<group>"; };
701D912B094B7AC1008B845F /* cAvidaDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAvidaDriver.h; sourceTree = "<group>"; };
@@ -1505,6 +1511,11 @@
DCC310040762539D008F7A48 /* main */ = {
isa = PBXGroup;
children = (
+ 70197433109F30330009BF3F /* cDemeInterface.h */,
+ 70197434109F30330009BF3F /* cTopoElement.h */,
+ 70197435109F30330009BF3F /* cTopologyManager.cc */,
+ 70197436109F30330009BF3F /* cTopologyManager.h */,
+ 70197437109F30330009BF3F /* cTopologyManagerChildInterface.h */,
70447BFD0F83B47900E1BF72 /* cBirthSelectionHandler.cc */,
709A1EE90EB6C42D006090AF /* cOrgMovementPredicate.h */,
709A1EEA0EB6C42D006090AF /* cResourceHistory.cc */,
@@ -2180,6 +2191,7 @@
70447CA80F83DB5600E1BF72 /* cBirthMateSelectHandler.cc in Sources */,
70447CAC0F83DBC100E1BF72 /* cBirthDemeHandler.cc in Sources */,
7020828F0FB9F2DF00637AD6 /* cBitArray.cc in Sources */,
+ 70197438109F303E0009BF3F /* cTopologyManager.cc in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: branches/topology-manager/source/main/cTopoElement.h
===================================================================
--- branches/topology-manager/source/main/cTopoElement.h 2009-11-01 21:08:42 UTC (rev 3519)
+++ branches/topology-manager/source/main/cTopoElement.h 2009-11-02 15:25:06 UTC (rev 3520)
@@ -33,8 +33,10 @@
class cTopoElement
{
protected:
- cTopoElement(); // @not_implemented
+ cTopoElement() { ; }
+public:
+ virtual ~cTopoElement();
};
Modified: branches/topology-manager/source/main/cTopologyManager.h
===================================================================
--- branches/topology-manager/source/main/cTopologyManager.h 2009-11-01 21:08:42 UTC (rev 3519)
+++ branches/topology-manager/source/main/cTopologyManager.h 2009-11-02 15:25:06 UTC (rev 3520)
@@ -62,9 +62,6 @@
class cSchedule;
class cEnvironment;
class cDeme;
-class cPhenotype;
-class cResourceCount;
-class cTopoElement;
class cTopologyManager : public cTopoElement
{
@@ -184,7 +181,7 @@
// AP 10/16/2009 Temporary Function.
- cPopulation& GetPopulation() { return(*m_pop); }
+ cPopulation& GetPopulation() { return (*m_pop); }
// Deme Resources
Modified: branches/topology-manager/source/main/cWorld.cc
===================================================================
--- branches/topology-manager/source/main/cWorld.cc 2009-11-01 21:08:42 UTC (rev 3519)
+++ branches/topology-manager/source/main/cWorld.cc 2009-11-02 15:25:06 UTC (rev 3520)
@@ -187,3 +187,6 @@
m_driver = driver;
m_own_driver = take_ownership;
}
+
+cPopulation& cWorld::GetPopulation() { return m_top->GetPopulation(); }
+
Modified: branches/topology-manager/source/main/cWorld.h
===================================================================
--- branches/topology-manager/source/main/cWorld.h 2009-11-01 21:08:42 UTC (rev 3519)
+++ branches/topology-manager/source/main/cWorld.h 2009-11-02 15:25:06 UTC (rev 3520)
@@ -37,9 +37,6 @@
#ifndef cRandom_h
#include "cRandom.h"
#endif
-#ifndef cTopologyManager_h
-#include "cTopologyManager.h"
-#endif
#if USE_tMemTrack
@@ -114,7 +111,7 @@
cEnvironment& GetEnvironment() { return *m_env; }
cHardwareManager& GetHardwareManager() { return *m_hw_mgr; }
// cPopulation& GetPopulation() { return *m_pop; }
- cPopulation& GetPopulation() { return m_top->GetPopulation(); }
+ cPopulation& GetPopulation();
cRandom& GetRandom() { return m_rng; }
cStats& GetStats() { return *m_stats; }
cWorldDriver& GetDriver() { return *m_driver; }
@@ -138,78 +135,6 @@
void GetEvents(cAvidaContext& ctx);
cEventList* GetEventsList() { return m_event_list; }
-
- // Save to archive
- template<class Archive>
- void save(Archive & a, const unsigned int version) const
- {
- a.ArkvObj("m_analyze", m_analyze);
- a.ArkvObj("m_conf", m_conf);
- a.ArkvObj("m_ctx", m_ctx);
- a.ArkvObj("m_class_mgr", m_class_mgr);
- a.ArkvObj("m_data_mgr", m_data_mgr);
- a.ArkvObj("m_env", m_env);
- a.ArkvObj("m_event_list", m_event_list);
- a.ArkvObj("m_hw_mgr", m_hw_mgr);
-// a.ArkvObj("m_pop", m_pop);
-// AP 10/2 what is this ?
- a.ArkvObj("m_stats", m_stats);
- a.ArkvObj("m_driver", m_driver);
- a.ArkvObj("m_rng", m_rng);
- int __m_test_on_div = (m_test_on_div == false)?(0):(1);
- int __m_test_sterilize = (m_test_sterilize == false)?(0):(1);
- int __m_own_driver = (m_own_driver == false)?(0):(1);
- a.ArkvObj("m_test_on_div", __m_test_on_div);
- a.ArkvObj("m_test_sterilize", __m_test_sterilize);
- a.ArkvObj("m_own_driver", __m_own_driver);
- }
-
- // Load from archive
- template<class Archive>
- void load(Archive & a, const unsigned int version){
- a.ArkvObj("m_analyze", m_analyze);
- a.ArkvObj("m_conf", m_conf);
- a.ArkvObj("m_ctx", m_ctx);
- a.ArkvObj("m_class_mgr", m_class_mgr);
- a.ArkvObj("m_data_mgr", m_data_mgr);
- a.ArkvObj("m_env", m_env);
- a.ArkvObj("m_event_list", m_event_list);
- a.ArkvObj("m_hw_mgr", m_hw_mgr);
-// a.ArkvObj("m_pop", m_pop);
- // AP 10/2 what is this ?
- a.ArkvObj("m_stats", m_stats);
- a.ArkvObj("m_driver", m_driver);
- a.ArkvObj("m_rng", m_rng);
- int __m_test_on_div;
- int __m_test_sterilize;
- int __m_own_driver;
- a.ArkvObj("m_test_on_div", __m_test_on_div);
- a.ArkvObj("m_test_sterilize", __m_test_sterilize);
- a.ArkvObj("m_own_driver", __m_own_driver);
- m_test_on_div = (__m_test_on_div == 0)?(false):(true);
- m_test_sterilize = (__m_test_sterilize == 0)?(false):(true);
- m_own_driver = (__m_own_driver == 0)?(false):(true);
- }
-
- // Ask archive to handle loads and saves separately
- template<class Archive>
- void serialize(Archive & a, const unsigned int version)
- {
- a.SplitLoadSave(*this, version);
- }
-
};
-
-#ifdef ENABLE_UNIT_TESTS
-namespace nWorld {
- /**
- * Run unit tests
- *
- * @param full Run full test suite; if false, just the fast tests.
- **/
- void UnitTests(bool full = false);
-}
#endif
-
-#endif
More information about the Avida-cvs
mailing list