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

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Wed May 23 21:33:09 PDT 2007


Author: hjg
Date: 2007-05-24 00:33:09 -0400 (Thu, 24 May 2007)
New Revision: 1599

Modified:
   branches/uml/source/main/cOrganism.cc
   branches/uml/source/main/cOrganism.h
   branches/uml/source/main/cUMLStateDiagram.cc
Log:
Added support for org to have its own UML model...


Modified: branches/uml/source/main/cOrganism.cc
===================================================================
--- branches/uml/source/main/cOrganism.cc	2007-05-24 04:29:43 UTC (rev 1598)
+++ branches/uml/source/main/cOrganism.cc	2007-05-24 04:33:09 UTC (rev 1599)
@@ -575,7 +575,7 @@
 	if(GetCellID()==-1) return;
 
 
-//  printXMI();
+	printStats();
 	
 
  assert(m_interface);
@@ -797,6 +797,11 @@
 	return true;
 }
   
+void cOrganism::printStats() 
+{
+	// for each state diagram
+	
+	// print the name, the number of states 
+}  
   
-  
   
\ No newline at end of file

Modified: branches/uml/source/main/cOrganism.h
===================================================================
--- branches/uml/source/main/cOrganism.h	2007-05-24 04:29:43 UTC (rev 1598)
+++ branches/uml/source/main/cOrganism.h	2007-05-24 04:33:09 UTC (rev 1599)
@@ -314,6 +314,7 @@
 //  bool firstStateDiagram() { m_state_diag = 0; }  
   bool currTrans (int, int, int, int, int, int); 
   cUMLStateDiagram* getStateDiagram();
+  void printStats();
 
  
 // The jump functions jump the index of the various vectors either forward (+ int) or backwards (- int)

Modified: branches/uml/source/main/cUMLStateDiagram.cc
===================================================================
--- branches/uml/source/main/cUMLStateDiagram.cc	2007-05-24 04:29:43 UTC (rev 1598)
+++ branches/uml/source/main/cUMLStateDiagram.cc	2007-05-24 04:33:09 UTC (rev 1599)
@@ -421,13 +421,12 @@
 
 	// This state is the initial state; thus it should be printed regardless of whether it has an incoming
 	// edge or not.
-	// Initial state - designed to help with Hydra.
-//	if (numStates() > 0) {
-		temp = "_1";
+	if (numStates() > 0) {
+		temp = StringifyAnInt(s_count);
 		xmi += "<UML:Pseudostate xmi.id=\"s" + temp + "\" kind=\"initial\" outgoing=\"\" name=\"s";
 		xmi += temp + "\" isSpecification=\"false\"/>\n";
 		++s_count;
-//	}
+	}
 	
 	for (; s_count < numStates(); ++s_count) {
 	




More information about the Avida-cvs mailing list