[Avida-SVN] r1816 - branches/uml/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Wed Jul 18 06:50:07 PDT 2007


Author: hjg
Date: 2007-07-18 09:50:06 -0400 (Wed, 18 Jul 2007)
New Revision: 1816

Modified:
   branches/uml/source/main/cUMLModel.cc
   branches/uml/source/main/cUMLModel.h
Log:


Modified: branches/uml/source/main/cUMLModel.cc
===================================================================
--- branches/uml/source/main/cUMLModel.cc	2007-07-17 20:27:18 UTC (rev 1815)
+++ branches/uml/source/main/cUMLModel.cc	2007-07-18 13:50:06 UTC (rev 1816)
@@ -42,6 +42,22 @@
 cUMLModel::~cUMLModel()
 {}
 
+float cUMLModel::getBonusInfo (std::string s)  
+{ 
+	float val;
+	std::map<std::string, float>::iterator bonus_info_pointer;
+	
+	bonus_info_pointer = bonus_info.find(s);
+	
+	if (bonus_info_pointer != bonus_info.end()) { 
+		val = bonus_info[s];
+	} else { 
+		val = 0;
+	}
+	return val; 
+}
+
+
 cUMLStateDiagram* cUMLModel::getStateDiagram (unsigned int x) 
 {
   assert(x<state_diagrams.size());

Modified: branches/uml/source/main/cUMLModel.h
===================================================================
--- branches/uml/source/main/cUMLModel.h	2007-07-17 20:27:18 UTC (rev 1815)
+++ branches/uml/source/main/cUMLModel.h	2007-07-18 13:50:06 UTC (rev 1816)
@@ -30,8 +30,8 @@
 	
 	// Set and access the bonus info for a model. Should be used by the tasks
 	void setBonusInfo (std::string s, float f) { bonus_info[s] = f; } 
-	float getBonusInfo (std::string s) { return bonus_info[s]; }
-	
+	float getBonusInfo (std::string);  
+		
 	// Get the number of, well, everything
 	int numStates();
 	int numTrans();




More information about the Avida-cvs mailing list