[Avida-cvs] [avida-svn] r441 - in development/source: classification cpu drivers

brysonda@myxo.css.msu.edu brysonda at myxo.css.msu.edu
Wed Jan 18 11:32:54 PST 2006


Author: brysonda
Date: 2006-01-18 14:32:53 -0500 (Wed, 18 Jan 2006)
New Revision: 441

Modified:
   development/source/classification/cClassificationManager.h
   development/source/classification/cGenotype.h
   development/source/classification/cGenotypeControl.h
   development/source/classification/cInjectGenotype.h
   development/source/classification/cInjectGenotypeControl.h
   development/source/classification/cInjectGenotypeElement.h
   development/source/classification/cInjectGenotypeQueue.h
   development/source/classification/cLineage.h
   development/source/classification/cSpecies.h
   development/source/classification/cSpeciesControl.h
   development/source/classification/cSpeciesQueue.h
   development/source/cpu/cCPUMemory.h
   development/source/cpu/cCPUStack.h
   development/source/cpu/cCPUTestInfo.h
   development/source/cpu/cCodeLabel.h
   development/source/cpu/cHardware4Stack.h
   development/source/cpu/cHardware4Stack_Thread.h
   development/source/cpu/cHardwareBase.h
   development/source/cpu/cHardwareCPU.h
   development/source/cpu/cHardwareCPU_Thread.h
   development/source/cpu/cHardwareManager.h
   development/source/cpu/cHardwareSMT.h
   development/source/cpu/cHardwareSMT_Thread.h
   development/source/cpu/cHardwareStatusPrinter.h
   development/source/cpu/cHeadCPU.h
   development/source/cpu/cHeadMultiMem.h
   development/source/cpu/cInstLibCPU.h
   development/source/cpu/cTestCPU.h
   development/source/cpu/cTestUtil.h
   development/source/cpu/tInstLib.h
   development/source/drivers/cAvidaDriver.h
   development/source/drivers/cDefaultAnalyzeDriver.h
   development/source/drivers/cDefaultRunDriver.h
   development/source/drivers/cDriverManager.h
   development/source/drivers/cFallbackWorldDriver.h
   development/source/drivers/cWorldDriver.h
Log:
Update coding style, specifically addressing unimplemented default constructor, copy constructor and assignment operator, for all classes in classification, cpu, and drivers.

Modified: development/source/classification/cClassificationManager.h
===================================================================
--- development/source/classification/cClassificationManager.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cClassificationManager.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -84,10 +84,10 @@
   
   cLineage* AddLineage(double start_fitness, int parent_lin_id, int id = -1, double lineage_stat1 = 0.0, double lineage_stat2 = 0.0);
   void UpdateLineages();
-  
-  
-  // Disable Copy Constructor
-  cClassificationManager(const cClassificationManager&);
+    
+  cClassificationManager(); // @not_implemented
+  cClassificationManager(const cClassificationManager&); // @not_implemented
+  cClassificationManager& operator=(const cClassificationManager&); // @not_implemented
 
 public:
   cClassificationManager(cWorld* world);

Modified: development/source/classification/cGenotype.h
===================================================================
--- development/source/classification/cGenotype.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cGenotype.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -87,11 +87,14 @@
   cDoubleSum tmp_sum_merit;
   cDoubleSum tmp_sum_fitness;
 
+  
   void CalcTestStats() const;
+  
   cGenotype(cWorld* world, int in_update_born, int in_id);
   
-  // Disable No-Argument Constructor
-  cGenotype();
+  cGenotype(); // @not_implemented
+  cGenotype(const cGenotype&); // @not_implemented
+  cGenotype& operator=(const cGenotype&); // @not_implemented
 
 public:
   ~cGenotype();

Modified: development/source/classification/cGenotypeControl.h
===================================================================
--- development/source/classification/cGenotypeControl.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cGenotypeControl.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -32,6 +32,11 @@
 
   void Insert(cGenotype & in_genotype, cGenotype * prev_genotype);
   bool CheckPos(cGenotype & in_genotype);
+  
+  cGenotypeControl(); // @not_implemented
+  cGenotypeControl(const cGenotypeControl&); // @not_implemented
+  cGenotypeControl& operator=(const cGenotypeControl&); // @not_implemented
+  
 public:
   cGenotypeControl(cWorld* world);
   ~cGenotypeControl();

Modified: development/source/classification/cInjectGenotype.h
===================================================================
--- development/source/classification/cInjectGenotype.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cInjectGenotype.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -56,8 +56,9 @@
   // Private Constructor
   cInjectGenotype(cWorld* world, int in_update_born = 0, int in_id = -1);
   
-  // Disable Default Constructor
-  cInjectGenotype();
+  cInjectGenotype(); // @not_implemented
+  cInjectGenotype(const cInjectGenotype&); // @not_implemented
+  cInjectGenotype& operator=(const cInjectGenotype&); // @not_implemented
   
 public:
   ~cInjectGenotype();

Modified: development/source/classification/cInjectGenotypeControl.h
===================================================================
--- development/source/classification/cInjectGenotypeControl.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cInjectGenotypeControl.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -32,6 +32,10 @@
 
   void Insert(cInjectGenotype& in_inject_genotype, cInjectGenotype* prev_inject_genotype);
   bool CheckPos(cInjectGenotype& in_inject_genotype);
+  
+  cInjectGenotypeControl(); // @not_implemented
+  cInjectGenotypeControl(const cInjectGenotypeControl&); // @not_implemented
+  cInjectGenotypeControl& operator=(const cInjectGenotypeControl&); // @not_implemented
 
 public:
   cInjectGenotypeControl(cWorld* world);

Modified: development/source/classification/cInjectGenotypeElement.h
===================================================================
--- development/source/classification/cInjectGenotypeElement.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cInjectGenotypeElement.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -22,6 +22,9 @@
   cInjectGenotype* inject_genotype;
   cInjectGenotypeElement* next;
   cInjectGenotypeElement* prev;
+  
+  cInjectGenotypeElement(const cInjectGenotypeElement&); // @not_implemented
+  cInjectGenotypeElement& operator=(const cInjectGenotypeElement&); // @not_implemented
 public:
   cInjectGenotypeElement(cInjectGenotype* in_gen = NULL)
     : inject_genotype(in_gen), next(NULL), prev(NULL) { ; }

Modified: development/source/classification/cInjectGenotypeQueue.h
===================================================================
--- development/source/classification/cInjectGenotypeQueue.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cInjectGenotypeQueue.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -24,6 +24,10 @@
   cInjectGenotypeElement root;
 
   void Remove(cInjectGenotypeElement* in_element);
+  
+  cInjectGenotypeQueue(const cInjectGenotypeQueue&); // @not_implemented
+  cInjectGenotypeQueue& operator=(const cInjectGenotypeQueue&); // @not_implemented
+  
 public:
   cInjectGenotypeQueue();
   ~cInjectGenotypeQueue();

Modified: development/source/classification/cLineage.h
===================================================================
--- development/source/classification/cLineage.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cLineage.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -60,7 +60,9 @@
            int update, double generation,
            double lineage_stat1 = 0.0, double lineage_stat2 = 0.0);
   
-  cLineage();
+  cLineage(); // @not_implemented
+  cLineage(const cLineage&); // @not_implemented
+  cLineage& operator=(const cLineage&); // @not_implemented
 
 public:
   ~cLineage() { ; }

Modified: development/source/classification/cSpecies.h
===================================================================
--- development/source/classification/cSpecies.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cSpecies.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -46,7 +46,10 @@
   cSpecies * prev;
   
   cSpecies(cWorld* world, const cGenome& in_genome, int update, int in_id);
-  cSpecies();
+
+  cSpecies(); // @not_implemented
+  cSpecies(const cSpecies&); // @not_implemented
+  cSpecies& operator=(const cSpecies&); // @not_implemented
   
 public:
   ~cSpecies();

Modified: development/source/classification/cSpeciesControl.h
===================================================================
--- development/source/classification/cSpeciesControl.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cSpeciesControl.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -26,7 +26,12 @@
   cSpeciesQueue active_queue;
   cSpeciesQueue inactive_queue;
   cSpeciesQueue garbage_queue;
+  
 
+  cSpeciesControl(); // @not_implemented
+  cSpeciesControl(const cSpeciesControl&); // @not_implemented
+  cSpeciesControl& operator=(const cSpeciesControl&); // @not_implemented
+
 public:
   cSpeciesControl(cWorld* world) : m_world(world) { ; }
   ~cSpeciesControl() { ; }

Modified: development/source/classification/cSpeciesQueue.h
===================================================================
--- development/source/classification/cSpeciesQueue.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/classification/cSpeciesQueue.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -21,6 +21,11 @@
 private:
   int size;
   cSpecies* first;
+  
+  
+  cSpeciesQueue(const cSpeciesQueue&); // @not_implemented
+  cSpeciesQueue& operator=(const cSpeciesQueue&); // @not_implemented
+  
 public:
   cSpeciesQueue() : size(0), first(NULL) { ; }
   ~cSpeciesQueue() { ; }

Modified: development/source/cpu/cCPUMemory.h
===================================================================
--- development/source/cpu/cCPUMemory.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cCPUMemory.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -18,13 +18,9 @@
 #include "tArray.h"
 #endif
 
-class cGenome;
-class cInstruction;
-class cMemoryFlags; // access
-class cString;
-template <class T> class tArray; // aggregate
 
-class cCPUMemory : public cGenome {
+class cCPUMemory : public cGenome
+{
 private:
 	static const unsigned char MASK_COPIED   = 0x01;
 	static const unsigned char MASK_MUTATED  = 0x02;
@@ -37,10 +33,12 @@
   
   tArray<unsigned char> flag_array;
   
+
   // A collection of sloppy instructions to perform oft-used functions that
   // will need to be cleaned up after this is run.
   void SloppyResize(int new_size);           // Set size, ignore new contents.
   void SloppyInsert(int pos, int num_lines); // Add lines, ignore new contents.
+
 public:
   explicit cCPUMemory(int _size=1)  : cGenome(_size), flag_array(_size) { ; }
   cCPUMemory(const cCPUMemory& in_memory);
@@ -48,8 +46,8 @@
   cCPUMemory(const cString& in_string) : cGenome(in_string), flag_array(in_string.GetSize()) { ; }
   ~cCPUMemory() { ; }
 
-  void operator=(const cCPUMemory & other_memory);
-  void operator=(const cGenome & other_genome);
+  void operator=(const cCPUMemory& other_memory);
+  void operator=(const cGenome& other_genome);
   void Copy(int to, int from);
 
   void Clear()
@@ -88,10 +86,10 @@
 	void ClearFlagCopyMut(int pos)    { flag_array[pos] &= ~MASK_COPYMUT;  }
   void ClearFlagInjected(int pos)   { flag_array[pos] &= ~MASK_INJECTED; }
     
-  void Insert(int pos, const cInstruction & in_inst);
-  void Insert(int pos, const cGenome & in_genome);
+  void Insert(int pos, const cInstruction& in_inst);
+  void Insert(int pos, const cGenome& in_genome);
   void Remove(int pos, int num_insts=1);
-  void Replace(int pos, int num_insts, const cGenome & in_genome);
+  void Replace(int pos, int num_insts, const cGenome& in_genome);
 };
 
 #endif

Modified: development/source/cpu/cCPUStack.h
===================================================================
--- development/source/cpu/cCPUStack.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cCPUStack.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -17,16 +17,18 @@
 #include "nHardware.h"
 #endif
 
-class cCPUStack {
+class cCPUStack
+{
 private:
   int stack[nHardware::STACK_SIZE];
   unsigned char stack_pointer;
+
 public:
   cCPUStack() { Clear(); }
-  cCPUStack(const cCPUStack & in_stack);
+  cCPUStack(const cCPUStack& in_stack);
   ~cCPUStack() { ; }
 
-  void operator=(const cCPUStack & in_stack);
+  void operator=(const cCPUStack& in_stack);
 
   inline void Push(int value);
   inline int Pop();

Modified: development/source/cpu/cCPUTestInfo.h
===================================================================
--- development/source/cpu/cCPUTestInfo.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cCPUTestInfo.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -25,7 +25,8 @@
 class cOrganism;
 class cString;
 
-class cCPUTestInfo {
+class cCPUTestInfo
+{
   friend class cTestCPU;
 private:
   // Inputs...
@@ -35,7 +36,7 @@
   bool trace_execution;       // Should we trace this CPU?
   bool trace_task_order;      // Should we keep track of ordering of tasks?
   bool use_random_inputs;     // Should we give the organism random inputs?
-  cHardwareTracer *m_tracer;
+  cHardwareTracer* m_tracer;
 
   // Outputs...
   bool is_viable;         // Is this organism colony forming?
@@ -44,11 +45,12 @@
   int max_cycle;          // Longest cycle found.
   int cycle_to;           // Cycle path of the last genotype.
 
-  tArray<cOrganism *> org_array;
+  tArray<cOrganism*> org_array;
 
-private:
-  // disabled copy constructor.
-  cCPUTestInfo(const cCPUTestInfo &);
+
+  cCPUTestInfo(const cCPUTestInfo&); // @not_implemented
+  cCPUTestInfo& operator=(const cCPUTestInfo&); // @not_implemented
+
 public:
   cCPUTestInfo(int max_tests=nHardware::TEST_CPU_GENERATIONS);
   ~cCPUTestInfo();

Modified: development/source/cpu/cCodeLabel.h
===================================================================
--- development/source/cpu/cCodeLabel.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cCodeLabel.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -32,21 +32,28 @@
  * a creature, and aid in its manipulation.
  **/
 
-class cCodeLabel {
+class cCodeLabel
+{
 private:
   tArray<char> nop_sequence;
   int size;
-  //const int base;
+
 public:
   cCodeLabel() : size(0) { ; }
   cCodeLabel(const cCodeLabel& in_label) : nop_sequence(in_label.nop_sequence), size(in_label.size) { ; }  
   ~cCodeLabel() { ; }
 
   bool OK();
-  bool operator==(const cCodeLabel & other_label) const;
-  bool operator!=(const cCodeLabel & other_label) const
-    { return !(operator==(other_label)); }
+  bool operator==(const cCodeLabel& other_label) const;
+  bool operator!=(const cCodeLabel& other_label) const { return !(operator==(other_label)); }
   char operator[](int position) const { return (int) nop_sequence[position]; }
+  cCodeLabel& operator=(const cCodeLabel& in_lbl)
+  {
+    nop_sequence = in_lbl.nop_sequence;
+    size = in_lbl.size;
+    return *this;
+  }
+  
   int FindSublabel(cCodeLabel & sub_label);
 
   void Clear() { size = 0; }

Modified: development/source/cpu/cHardware4Stack.h
===================================================================
--- development/source/cpu/cHardware4Stack.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardware4Stack.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -41,8 +41,6 @@
 #include "tArray.h"
 #endif
 
-class cInstSet;
-class cInstLibBase;
 class cOrganism;
 class cMutation;
 class cInjectGenotype;
@@ -56,26 +54,24 @@
 
 class cCodeLabel;
 class cCPUMemory;
-class cCPUStack; // aggregate
-class cHeadMultiMem; // access
 class cGenome;
-class cHardware4Stack_Thread; // access
 class cInjectGenotype;
-class cInstLib4Stack; // access
+class cInstLib4Stack;
+class cInstLibBase;
 class cInstruction;
 class cInstSet;
 class cOrganism;
-class cString; // aggregate
-template <class T> class tArray; // aggregate
 
-class cHardware4Stack : public cHardwareBase {
+class cHardware4Stack : public cHardwareBase
+{
 public:
   typedef bool (cHardware4Stack::*tHardware4StackMethod)();
 private:
   static cInstLib4Stack* s_inst_slib;
   static cInstLib4Stack* initInstLib(void);
+  
   tHardware4StackMethod* m_functions;
-private:
+
   tArray<cCPUMemory> memory_array;          // Memory...
   //cCPUStack global_stack;     // A stack that all threads share.
   cCPUStack global_stacks[nHardware4Stack::NUM_GLOBAL_STACKS];
@@ -99,6 +95,7 @@
   // Keeps track of fractional instructions that carry over into next update
   float inst_remainder; 
 
+  
   bool SingleProcess_PayCosts(const cInstruction & cur_inst);
   bool SingleProcess_ExecuteInst(const cInstruction & cur_inst);
   
@@ -126,14 +123,14 @@
   cCodeLabel & GetReadLabel() { return threads[cur_thread].read_label; }
   
 
-  bool TriggerMutations_ScopeGenome(const cMutation * cur_mut,
-                                    cCPUMemory & target_memory, cHeadCPU& cur_head, const double rate);
-  bool TriggerMutations_ScopeLocal(const cMutation * cur_mut,
-                                   cCPUMemory & target_memory, cHeadCPU& cur_head, const double rate);
-  int TriggerMutations_ScopeGlobal(const cMutation * cur_mut,
-                                   cCPUMemory & target_memory, cHeadCPU& cur_head, const double rate);
+  bool TriggerMutations_ScopeGenome(const cMutation* cur_mut, cCPUMemory& target_memory,
+                                    cHeadCPU& cur_head, const double rate);
+  bool TriggerMutations_ScopeLocal(const cMutation* cur_mut, cCPUMemory& target_memory,
+                                   cHeadCPU& cur_head, const double rate);
+  int TriggerMutations_ScopeGlobal(const cMutation* cur_mut, cCPUMemory& target_memory,
+                                   cHeadCPU& cur_head, const double rate);
   void TriggerMutations_Body(int type, cCPUMemory & target_memory, cHeadCPU& cur_head);
-  
+
   // ---------- Instruction Helpers -----------
   int FindModifiedStack(int default_stack);
   int FindModifiedHead(int default_head);
@@ -165,10 +162,11 @@
   bool isEmpty(int mem_space_used);
   inline int NormalizeMemSpace(int mem_space) const;
   
+  cHardware4Stack& operator=(const cHardware4Stack&); // @not_implemented
   
 public:
   cHardware4Stack(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set);
-  explicit cHardware4Stack(const cHardware4Stack &);
+  explicit cHardware4Stack(const cHardware4Stack&);
   ~cHardware4Stack() { ; }
   static cInstLibBase* GetInstLib();
   static cString GetDefaultInstFilename() { return "inst_lib.4stack"; }

Modified: development/source/cpu/cHardware4Stack_Thread.h
===================================================================
--- development/source/cpu/cHardware4Stack_Thread.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardware4Stack_Thread.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -35,16 +35,13 @@
  * @see cCPUStack, cHeadMultiMem, cHardware4Stack
  **/
 
-class cHeadMultiMem; // aggregate
-class cCodeLabel; // aggregate
-class cCPUStack; // aggregate
-class cHardwareBase;
 class cInjectGenotype;
-template <class T> class tBuffer; // aggregate
 
-struct cHardware4Stack_Thread {
+struct cHardware4Stack_Thread
+{
 private:
   int id;
+
 public:
   cHeadMultiMem heads[nHardware::NUM_HEADS];
   unsigned char cur_head;
@@ -56,12 +53,13 @@
   // If this thread was spawned by Inject, this will point to the genotype 
   // of the parasite running the thread.  Otherwise, it will be NULL.
   cInjectGenotype* owner;
-public:
-  cHardware4Stack_Thread(cHardwareBase * in_hardware=NULL, int _id=-1);
-  cHardware4Stack_Thread(const cHardware4Stack_Thread & in_thread, int _id=-1);
+
+
+  cHardware4Stack_Thread(cHardwareBase* in_hardware = NULL, int _id = -1);
+  cHardware4Stack_Thread(const cHardware4Stack_Thread& in_thread, int _id = -1);
   ~cHardware4Stack_Thread();
 
-  void operator=(const cHardware4Stack_Thread & in_thread);
+  void operator=(const cHardware4Stack_Thread& in_thread);
 
   void Reset(cHardwareBase * in_hardware, int _id);
   int GetID() const { return id; }

Modified: development/source/cpu/cHardwareBase.h
===================================================================
--- development/source/cpu/cHardwareBase.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardwareBase.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -27,13 +27,19 @@
 class cString;
 class cWorld;
 
-class cHardwareBase {
+class cHardwareBase
+{
 protected:
   cWorld* m_world;
   cOrganism* organism;       // Organism using this hardware.
   cInstSet* m_inst_set;        // Instruction set being used.
   cHardwareTracer* m_tracer; // Set this if you want execution traced.
 
+
+  cHardwareBase(); // @not_implemented
+  cHardwareBase(const cHardwareBase&); // @not_implemented
+  cHardwareBase& operator=(const cHardwareBase&); // @not_implemented
+
 public:
   cHardwareBase(cWorld* world, cOrganism* in_organism, cInstSet* inst_set)
     : m_world(world), organism(in_organism), m_inst_set(inst_set), m_tracer(NULL)

Modified: development/source/cpu/cHardwareCPU.h
===================================================================
--- development/source/cpu/cHardwareCPU.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardwareCPU.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -55,27 +55,24 @@
  * @see cHardwareCPU_Thread, cCPUStack, cCPUMemory, cInstSet
  **/
 
-class cCodeLabel; // access
-class cGenome;
 class cInjectGenotype;
 class cInstLibBase;
 class cInstLibCPU;
-class cInstruction;
 class cInstSet;
 class cMutation;
 class cOrganism;
 template <class T> class tBuffer;
-template <class T> class tArray; // aggregate
 
-class cHardwareCPU : public cHardwareBase {
+class cHardwareCPU : public cHardwareBase
+{
 public:
   typedef bool (cHardwareCPU::*tHardwareCPUMethod)();
 
 private:
-  static cInstLibCPU *s_inst_slib;
-  static cInstLibCPU *initInstLib(void);
+  static cInstLibCPU* s_inst_slib;
+  static cInstLibCPU* initInstLib(void);
 
-  tHardwareCPUMethod *m_functions;
+  tHardwareCPUMethod* m_functions;
 
   cCPUMemory memory;          // Memory...
   cCPUStack global_stack;     // A stack that all threads share.
@@ -94,7 +91,10 @@
   tArray<int> inst_cost;
   tArray<int> inst_ft_cost;
 #endif
+  
 
+  cHardwareCPU& operator=(const cHardwareCPU&); // @not_implemented
+
 public:
   cHardwareCPU(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set);
   explicit cHardwareCPU(const cHardwareCPU&);

Modified: development/source/cpu/cHardwareCPU_Thread.h
===================================================================
--- development/source/cpu/cHardwareCPU_Thread.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardwareCPU_Thread.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -38,15 +38,11 @@
  * @see cCPUStack, cHeadCPU, cHardwareCPU
  **/
 
-class cCodeLabel; // aggregate;
-class cHeadCPU; // aggregate
-class cCPUStack; // aggregate
-class cHardwareBase;
-template <class T> class tBuffer; // aggregate
-
-struct cHardwareCPU_Thread {
+struct cHardwareCPU_Thread
+{
 private:
   int id;
+
 public:
   int reg[nHardwareCPU::NUM_REGISTERS];
   cHeadCPU heads[nHardware::NUM_HEADS];
@@ -56,14 +52,15 @@
 
   cCodeLabel read_label;
   cCodeLabel next_label;
-public:
-  cHardwareCPU_Thread(cHardwareBase * in_hardware=NULL, int _id=-1);
-  cHardwareCPU_Thread(const cHardwareCPU_Thread & in_thread, int _id=-1);
+
+  
+  cHardwareCPU_Thread(cHardwareBase* in_hardware = NULL, int _id = -1);
+  cHardwareCPU_Thread(const cHardwareCPU_Thread& in_thread, int _id = -1);
   ~cHardwareCPU_Thread();
 
-  void operator=(const cHardwareCPU_Thread & in_thread);
+  void operator=(const cHardwareCPU_Thread& in_thread);
 
-  void Reset(cHardwareBase * in_hardware, int _id);
+  void Reset(cHardwareBase* in_hardware, int _id);
   int GetID() const { return id; }
   void SetID(int _id) { id = _id; }
 };

Modified: development/source/cpu/cHardwareManager.h
===================================================================
--- development/source/cpu/cHardwareManager.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardwareManager.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -25,6 +25,11 @@
   cInstSet m_inst_set;
   int m_type;
   
+  
+  cHardwareManager(); // @not_implemented
+  cHardwareManager(const cHardwareManager&); // @not_implemented
+  cHardwareManager& operator=(const cHardwareManager&); // @not_implemented
+  
 public:
   cHardwareManager(cWorld* world);
   ~cHardwareManager() { ; }

Modified: development/source/cpu/cHardwareSMT.h
===================================================================
--- development/source/cpu/cHardwareSMT.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardwareSMT.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -60,7 +60,8 @@
 class cInstSet;
 class cOrganism;
 
-class cHardwareSMT : public cHardwareBase {
+class cHardwareSMT : public cHardwareBase
+{
 public:
   typedef bool (cHardwareSMT::*tMethod)();
 
@@ -89,8 +90,6 @@
 #endif
 
   
-  cHardwareSMT(const cHardwareSMT&); // @DMB - disabled...  can't (easily) copy m_mem_lbls
-
   bool SingleProcess_PayCosts(const cInstruction& cur_inst);
   bool SingleProcess_ExecuteInst(const cInstruction& cur_inst);
   	
@@ -159,6 +158,8 @@
 	
   inline int NormalizeMemSpace(int mem_space) const;
 
+  cHardwareSMT(const cHardwareSMT&); // @not_implemented
+  cHardwareSMT& operator=(const cHardwareSMT&); // @not_implemented
   
 public:
   cHardwareSMT(cWorld* world, cOrganism* in_organism, cInstSet* in_inst_set);

Modified: development/source/cpu/cHardwareSMT_Thread.h
===================================================================
--- development/source/cpu/cHardwareSMT_Thread.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardwareSMT_Thread.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -37,7 +37,8 @@
 class cHardwareBase;
 class cInjectGenotype;
 
-struct cHardwareSMT_Thread {
+struct cHardwareSMT_Thread
+{
 private:
   int id;
 public:
@@ -51,8 +52,9 @@
   // If this thread was spawned by Inject, this will point to the genotype 
   // of the parasite running the thread.  Otherwise, it will be NULL.
   cInjectGenotype* owner;
-public:
-		cHardwareSMT_Thread(cHardwareBase* in_hardware = NULL, int _id = -1);
+
+  
+  cHardwareSMT_Thread(cHardwareBase* in_hardware = NULL, int _id = -1);
   cHardwareSMT_Thread(const cHardwareSMT_Thread& in_thread, int _id = -1);
   ~cHardwareSMT_Thread();
 	

Modified: development/source/cpu/cHardwareStatusPrinter.h
===================================================================
--- development/source/cpu/cHardwareStatusPrinter.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHardwareStatusPrinter.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -49,6 +49,9 @@
   const cString& GetNextInstName(cHardwareSMT& hardware);
   cString Bonus(const cString& next_name);
   void PrintStatus(cHardwareBase& hardware, const cString& next_name);
+  
+  cHardwareStatusPrinter(); // @not_implemented
+
 public:
   cHardwareStatusPrinter(std::ostream& trace_fp) : m_trace_fp(trace_fp) {;}
 

Modified: development/source/cpu/cHeadCPU.h
===================================================================
--- development/source/cpu/cHeadCPU.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHeadCPU.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -25,20 +25,20 @@
 class cGenome;
 class cInstruction;
 
-class cHeadCPU {
+class cHeadCPU
+{
 protected:
-  cHardwareBase * main_hardware;
-  cHardwareBase * cur_hardware;
+  cHardwareBase* main_hardware;
+  cHardwareBase* cur_hardware;
   int position;
 
-  int FindLabel_Forward(const cCodeLabel & search_label,
-			const cGenome & search_mem, int pos);
-  int FindLabel_Backward(const cCodeLabel & search_label,
-			 const cGenome & search_mem, int pos);
+  int FindLabel_Forward(const cCodeLabel& search_label, const cGenome& search_mem, int pos);
+  int FindLabel_Backward(const cCodeLabel& search_label, const cGenome& search_mem, int pos);
+
 public:
   cHeadCPU();
-  cHeadCPU(cHardwareBase * in_hardware, int in_pos = 0);
-  cHeadCPU(const cHeadCPU & in_cpu_head);
+  cHeadCPU(cHardwareBase* in_hardware, int in_pos = 0);
+  cHeadCPU(const cHeadCPU& in_cpu_head);
   virtual ~cHeadCPU() { ; }
   
   /**
@@ -103,7 +103,7 @@
   virtual void ClearFlagCopyMut();
     
   // Operator Overloading...
-  virtual cHeadCPU & operator=(const cHeadCPU & in_cpu_head);
+  virtual cHeadCPU& operator=(const cHeadCPU& in_cpu_head);
   cHeadCPU & operator++();
   cHeadCPU & operator--();
   cHeadCPU & operator++(int);

Modified: development/source/cpu/cHeadMultiMem.h
===================================================================
--- development/source/cpu/cHeadMultiMem.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cHeadMultiMem.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -15,7 +15,8 @@
 #include "cHeadCPU.h"
 #endif
 
-class cHeadMultiMem : public cHeadCPU {
+class cHeadMultiMem : public cHeadCPU
+{
 private:
   int mem_space;
 
@@ -56,8 +57,8 @@
   void ClearFlagCopyMut();
   
   // Operator Overloading...
-  cHeadMultiMem& operator=(const cHeadMultiMem & in_cpu_head);
-  bool operator==(const cHeadMultiMem & in_cpu_head) const; 
+  cHeadMultiMem& operator=(const cHeadMultiMem& in_cpu_head);
+  bool operator==(const cHeadMultiMem& in_cpu_head) const; 
   bool AtEnd() const;
   bool InMemory() const;
 };

Modified: development/source/cpu/cInstLibCPU.h
===================================================================
--- development/source/cpu/cInstLibCPU.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cInstLibCPU.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -22,7 +22,9 @@
 
 class cString;
 
-class cInstLibCPU : public cInstLibBase {
+class cInstLibCPU : public cInstLibBase
+{
+private:
   const size_t m_nopmods_array_size;
   const size_t m_function_array_size;
   cString *m_nopmod_names;
@@ -31,8 +33,10 @@
   cHardwareCPU::tHardwareCPUMethod *m_functions;
   static const cInstruction inst_error;
   static const cInstruction inst_default;
+
 protected:
   friend class cHardwareCPU;
+  
   cInstLibCPU(
     size_t nopmod_array_size,
     size_t function_array_size,
@@ -48,6 +52,7 @@
     m_functions(functions)
   {}
   cHardwareCPU::tHardwareCPUMethod *GetFunctions(void){ return m_functions; } 
+
 public:
   const cString &GetName(const unsigned int id) {
     assert(id < m_function_array_size);

Modified: development/source/cpu/cTestCPU.h
===================================================================
--- development/source/cpu/cTestCPU.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cTestCPU.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -32,7 +32,8 @@
 class cGenome;
 class cWorld;
 
-class cTestCPU {
+class cTestCPU
+{
 private:
   cWorld* m_world;
   cPopulationInterface test_interface;
@@ -46,9 +47,14 @@
   tArray<double> d_resources;
   int time_mod;
 
+  
   bool ProcessGestation(cCPUTestInfo & test_info, int cur_depth);
   bool TestGenome_Body(cCPUTestInfo & test_info, const cGenome & genome, int cur_depth);
 
+  cTestCPU(); // @not_implemented
+  cTestCPU(const cTestCPU&); // @not_implemented
+  cTestCPU& operator=(const cTestCPU&); // @not_implemented
+  
 public:
   cTestCPU(cWorld* world);
   ~cTestCPU() { ; }

Modified: development/source/cpu/cTestUtil.h
===================================================================
--- development/source/cpu/cTestUtil.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/cTestUtil.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -25,7 +25,11 @@
 class cInjectGenotype;
 class cWorld;
 
-class cTestUtil {
+class cTestUtil
+{
+private:
+  cTestUtil(); // @not_implemented
+  
 public:
   static void PrintGenome(cWorld* world, const cGenome & genome, cString filename="",
                           cGenotype * genotype=NULL, int update_out=-1);

Modified: development/source/cpu/tInstLib.h
===================================================================
--- development/source/cpu/tInstLib.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/cpu/tInstLib.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -19,7 +19,9 @@
 
 class cInstruction;
 
-template <class MethodType> class tInstLib : public cInstLibBase {
+template <class MethodType> class tInstLib : public cInstLibBase
+{
+private:
   const size_t m_nopmods_array_size;
   const size_t m_function_array_size;
   cString* m_nopmod_names;
@@ -28,6 +30,7 @@
   MethodType* m_functions;
   const cInstruction inst_error;
   const cInstruction inst_default;
+
 public:
 		tInstLib(
 						 size_t nopmod_array_size,

Modified: development/source/drivers/cAvidaDriver.h
===================================================================
--- development/source/drivers/cAvidaDriver.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/drivers/cAvidaDriver.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -17,7 +17,8 @@
 class cAvidaDriver
 {
 private:
-  cAvidaDriver(const cAvidaDriver&);  // not implemented
+  cAvidaDriver(const cAvidaDriver&); // @not_implemented
+  cAvidaDriver& operator=(const cAvidaDriver&); // @not_implemented
 
 public:
   cAvidaDriver() { ; }

Modified: development/source/drivers/cDefaultAnalyzeDriver.h
===================================================================
--- development/source/drivers/cDefaultAnalyzeDriver.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/drivers/cDefaultAnalyzeDriver.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -23,7 +23,9 @@
 class cDefaultAnalyzeDriver : public cAvidaDriver, public cWorldDriver
 {
 private:
-  cDefaultAnalyzeDriver();  // not implemented
+  cDefaultAnalyzeDriver(); // @not_implemented
+  cDefaultAnalyzeDriver(const cDefaultAnalyzeDriver&); // @not_implemented
+  cDefaultAnalyzeDriver& operator=(const cDefaultAnalyzeDriver&); // @not_implemented
   
 protected:
   cWorld* m_world;

Modified: development/source/drivers/cDefaultRunDriver.h
===================================================================
--- development/source/drivers/cDefaultRunDriver.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/drivers/cDefaultRunDriver.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -23,7 +23,9 @@
 class cDefaultRunDriver : public cAvidaDriver, public cWorldDriver
 {
 private:
-  cDefaultRunDriver();  // not implemented
+  cDefaultRunDriver(); // @not_implemented
+  cDefaultRunDriver(const cDefaultRunDriver&); // @not_implemented
+  cDefaultRunDriver& operator=(const cDefaultRunDriver&); // @not_implemented
 
 protected:
   cWorld* m_world;

Modified: development/source/drivers/cDriverManager.h
===================================================================
--- development/source/drivers/cDriverManager.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/drivers/cDriverManager.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -28,8 +28,8 @@
   cDriverManager() { ; }
   ~cDriverManager();
 
-  // not implemented
-  cDriverManager(const cDriverManager&);
+  cDriverManager(const cDriverManager&); // @not_implemented
+  cDriverManager& operator=(const cDriverManager&); // @not_implemented
 
 public:
   static void Initialize(); // initialize static driver manager.  This method is NOT thread-safe.

Modified: development/source/drivers/cFallbackWorldDriver.h
===================================================================
--- development/source/drivers/cFallbackWorldDriver.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/drivers/cFallbackWorldDriver.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -19,6 +19,10 @@
 
 class cFallbackWorldDriver : public cWorldDriver
 {
+private:
+  cFallbackWorldDriver(const cFallbackWorldDriver&); // @not_implemented
+  cFallbackWorldDriver& operator=(const cFallbackWorldDriver&); // @not_implemented
+  
 public:
   cFallbackWorldDriver() { cDriverManager::Register(this); }
   ~cFallbackWorldDriver() { cDriverManager::Unregister(this); }

Modified: development/source/drivers/cWorldDriver.h
===================================================================
--- development/source/drivers/cWorldDriver.h	2006-01-18 17:50:07 UTC (rev 440)
+++ development/source/drivers/cWorldDriver.h	2006-01-18 19:32:53 UTC (rev 441)
@@ -18,7 +18,8 @@
 class cWorldDriver
 {
 private:
-  cWorldDriver(const cWorldDriver&);  // not implemented
+  cWorldDriver(const cWorldDriver&); // @not_implemented
+  cWorldDriver& operator=(const cWorldDriver&); // @not_implemented
 
 public:
   cWorldDriver() { ; }




More information about the Avida-cvs mailing list