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

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Wed Feb 13 11:31:03 PST 2008


Author: hjg
Date: 2008-02-13 14:30:53 -0500 (Wed, 13 Feb 2008)
New Revision: 2325

Added:
   branches/uml/source/main/cMDEExpression.h
Log:


Added: branches/uml/source/main/cMDEExpression.h
===================================================================
--- branches/uml/source/main/cMDEExpression.h	                        (rev 0)
+++ branches/uml/source/main/cMDEExpression.h	2008-02-13 19:30:53 UTC (rev 2325)
@@ -0,0 +1,58 @@
+#ifndef _C_MDEEXPRESSION_H_
+#define _C_MDEEXPRESSION_H_
+/*
+ *  cMDEExpression.h
+ *  
+ *
+ *  Created by Heather Goldsby on 2/12/2008.
+ *  Copyright 2007 __MyCompanyName__. All rights reserved.
+ *
+ */
+#include <string>
+#include <iostream>
+#include <cassert>
+
+
+
+class cMDEExpression{
+	
+public:
+	// A function that returns an expression
+	std::string getExpr() const { return _expr; }
+	void setExpr(std::string s) { _expr = s; }
+	bool operator==(const cMDEExpression that) {
+//		std::cout << _expr << " " << that.getExpr() << std::endl;
+		return (_expr == that.getExpr());
+	}
+	void addRelatedClass(std::string c) { _related_classes.insert(c); }
+	void setRelatedClasses(std::set<std::string> s) { _related_classes = s; }
+	std::set<std::string> getRelatedClasses() { return _related_classes; }
+
+		
+protected:
+	std::string _expr;
+	std::set<std::string> _related_classes;
+	// Ok, eventually, to do more complex expression creation, we need to get it to check the types...
+	
+//	std::string _types;
+	
+};
+
+
+
+
+/*
+struct ltcMDEExpression{ 
+	bool operator() (cMDEExpression* p1, cMDEExpression* p2) const
+	{
+		std::string name1, name2;
+		
+		name1 = p1->getExpr();
+		name2 = p2->getExpr(); 
+		// 1st less than 2nd & 2nd never equal to the first. 
+		
+		return (name1 < name2);
+	}
+};
+*/
+#endif




More information about the Avida-cvs mailing list