[Avida-SVN] r1722 - in development/source: analyze main tools

ofria at myxo.css.msu.edu ofria at myxo.css.msu.edu
Wed Jun 27 13:55:23 PDT 2007


Author: ofria
Date: 2007-06-27 16:55:22 -0400 (Wed, 27 Jun 2007)
New Revision: 1722

Modified:
   development/source/analyze/cAnalyze.cc
   development/source/analyze/cAnalyze.h
   development/source/main/cAvidaConfig.h
   development/source/tools/cFlexVar.h
   development/source/tools/tDataEntry.h
   development/source/tools/tDataEntryBase.h
   development/source/tools/tDataEntryCommand.h
Log:
Setup color control for analyze mode outputs -- there are now several new settings at the bottom of genesis
that allow you to choose what colors are used in all of the outputs.

Some refinements to the cFlexVar class, and the beginnings of integrating it into the existing code (a lot more
still needs to be done here.


Modified: development/source/analyze/cAnalyze.cc
===================================================================
--- development/source/analyze/cAnalyze.cc	2007-06-27 19:43:41 UTC (rev 1721)
+++ development/source/analyze/cAnalyze.cc	2007-06-27 20:55:22 UTC (rev 1722)
@@ -1052,6 +1052,7 @@
   // At least one argument is rquired.
   if (cur_string.GetSize() == 0) {
     cerr << "Error: At least one argument is required in FIND_ORGANISM." << endl;
+    cerr << " (perhaps you want FIND_GENOTYPE?)" << endl;
     return;
   }
   
@@ -1896,7 +1897,7 @@
           prev_genotype->SetSpecialArgs(data_command->GetArgs());
           compare = data_command->Compare(prev_genotype);
         }
-        data_command->HTMLPrint(fp, compare);
+	HTMLPrintStat(data_command, fp, compare);
       }
       else {  // if (format_type == FILE_TYPE_TEXT) {
         fp << data_command->GetEntry() << " ";
@@ -1914,8 +1915,7 @@
       }
     }
     else {
-      // Always moveon if we're not basing this on time, or if we've run out
-      // of genotypes.
+      // Always moveon if we're not basing this on time, or if we've run out of genotypes.
       prev_genotype = cur_genotype;
       cur_genotype = next_genotype;
       next_genotype = batch_it.Next();
@@ -1928,7 +1928,7 @@
     fp << "</table>" << endl
     << "</center>" << endl;
   }
-  }
+}
 
 void cAnalyze::CommandDetailAverage_Body(ostream& fp, int nucoutputs,
                                          tListIterator< tDataEntryCommand<cAnalyzeGenotype> > & output_it)
@@ -2085,7 +2085,7 @@
       cur_command->SetTarget(genotype);
       genotype->SetSpecialArgs(cur_command->GetArgs());
       if (file_type == FILE_TYPE_HTML) {
-        cur_command->HTMLPrint(fp, 0);
+	HTMLPrintStat(cur_command, fp);
       }
       else {  // if (file_type == FILE_TYPE_TEXT) {
         fp << cur_command->GetEntry() << " ";
@@ -4309,10 +4309,7 @@
   if (arg_list.PopString("html") != "") file_type = FILE_TYPE_HTML;
   if (arg_list.PopString("link_maps") != "") link_maps = true;
   if (arg_list.PopString("link_insts") != "") link_insts = true;
-  if (arg_list.PopString("use_resources=2") != "") 
-  {
-    useResources = 2;
-  }
+  if (arg_list.PopString("use_resources=2") != "") useResources = 2;
     
   cout << "There are " << arg_list.GetSize() << " column args." << endl;
   
@@ -4454,9 +4451,9 @@
         data_command->SetTarget(genotype);
         genotype->SetSpecialArgs(data_command->GetArgs());
         if (data_command->Compare(&null_genotype) > 0) {
-          fp << "<th bgcolor=\"#00FF00\">";
+          fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_POS.Get() << "\">";
         }
-        else  fp << "<th bgcolor=\"#FF0000\">";
+        else  fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_LETHAL.Get() << "\">";
         
         if (data_command->HasArg("blank") == true) fp << "&nbsp;" << " ";
         else fp << data_command->GetEntry() << " ";
@@ -4529,8 +4526,7 @@
         // cause landscaping to be triggered in a context that causes a crash, 
         // notably, if you don't provide any column parameters to MapTasks.. @JEB
         if (file_type == FILE_TYPE_HTML) {
-          data_command->HTMLPrint(fp, compare,
-                                  !(data_command->HasArg("blank")));
+	  HTMLPrintStat(data_command, fp, compare, !(data_command->HasArg("blank")));
         } 
         else fp << data_command->GetEntry() << " ";
         
@@ -4552,10 +4548,10 @@
       
       for (int i = 0; i < num_cols; i++) {
         if (col_pass_count[i] > 0) {
-          fp << "<th bgcolor=\"#00FF00\">" << col_pass_count[i];
+          fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_POS.Get() << "\">" << col_pass_count[i];
         }
         else if (col_fail_count[i] > 0) {
-          fp << "<th bgcolor=\"#FF0000\">" << col_fail_count[i];
+          fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_LETHAL.Get() << "\">" << col_fail_count[i];
         }
         else fp << "<th>0";
       }
@@ -5261,19 +5257,19 @@
           if (test_fitness == 1.0) {           // Neutral Mutation...
             row_neut++;
             total_neut++;
-            if (file_type == FILE_TYPE_HTML) color_string = "#FFFFFF";
+            if (file_type == FILE_TYPE_HTML) color_string = m_world->GetConfig().COLOR_MUT_NEUT.Get();
           } else if (test_fitness == 0.0) {    // Lethal Mutation...
             row_dead++;
             total_dead++;
-            if (file_type == FILE_TYPE_HTML) color_string = "#FF0000";
+            if (file_type == FILE_TYPE_HTML) color_string = m_world->GetConfig().COLOR_MUT_LETHAL.Get();
           } else if (test_fitness < 1.0) {     // Detrimental Mutation...
             row_neg++;
             total_neg++;
-            if (file_type == FILE_TYPE_HTML) color_string = "#FFFF00";
+            if (file_type == FILE_TYPE_HTML) color_string = m_world->GetConfig().COLOR_MUT_NEG.Get();
           } else {                             // Beneficial Mutation...
             row_pos++;
             total_pos++;
-            if (file_type == FILE_TYPE_HTML) color_string = "#00FF00";
+            if (file_type == FILE_TYPE_HTML) color_string = m_world->GetConfig().COLOR_MUT_POS.Get();
           }
           
           // Write out this cell...
@@ -5293,10 +5289,10 @@
       
       // Categorize this mutation if its in HTML mode (color only)...
       if (file_type == FILE_TYPE_HTML) {
-        if (test_fitness == 1.0) color_string = "#FFFFFF";
-        else if (test_fitness == 0.0) color_string = "#FF0000";
-        else if (test_fitness < 1.0) color_string = "#FFFF00";
-        else color_string = "#00FF00";
+        if (test_fitness == 1.0) color_string =  m_world->GetConfig().COLOR_MUT_NEUT.Get();
+        else if (test_fitness == 0.0) color_string = m_world->GetConfig().COLOR_MUT_LETHAL.Get();
+        else if (test_fitness < 1.0) color_string = m_world->GetConfig().COLOR_MUT_NEG.Get();
+        else color_string = m_world->GetConfig().COLOR_MUT_POS.Get();
         
         fp << "<th bgcolor=\"" << color_string << "\">";
       }
@@ -5304,16 +5300,16 @@
       fp << test_fitness << " ";
       
       // Fraction Columns...
-      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#FF0000\">";
+      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_LETHAL.Get() << "\">";
       fp << (double) row_dead / (double) (num_insts-1) << " ";
       
-      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#FFFF00\">";
+      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_NEG.Get() << "\">";
       fp << (double) row_neg / (double) (num_insts-1) << " ";
       
-      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#FFFFFF\">";
+      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_NEUT.Get() << "\">";
       fp << (double) row_neut / (double) (num_insts-1) << " ";
       
-      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#00FF00\">";
+      if (file_type == FILE_TYPE_HTML) fp << "<th bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_POS.Get() << "\">";
       fp << (double) row_pos / (double) (num_insts-1) << " ";
       
       
@@ -6447,10 +6443,10 @@
     fp << "<tr><th>Average <th>" << total_length / num_genomes << " ";
     for (int i = 0; i < num_insts; i++) {
       double inst_freq = total_freq[i] / num_genomes;
-      if (inst_freq == 0.0) fp << "<td bgcolor=\"FF0000\">";
-      else if (inst_freq < min_freq) fp << "<td bgcolor=\"FFFF00\">";
-      else if (inst_freq < max_freq) fp << "<td bgcolor=\"0000FF\">";
-      else fp << "<td bgcolor=\"00FF00\">";
+      if (inst_freq == 0.0) fp << "<td bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_LETHAL.Get() << "\">";
+      else if (inst_freq < min_freq) fp << "<td bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_NEG.Get() << "\">";
+      else if (inst_freq < max_freq) fp << "<td bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_NEUT.Get() << "\">";
+      else fp << "<td bgcolor=\"#" << m_world->GetConfig().COLOR_MUT_POS.Get() << "\">";
       fp << cStringUtil::Stringf("%04.3f", inst_freq) << " ";
     }
     fp << "</tr>" << endl
@@ -7163,6 +7159,11 @@
 
 void cAnalyze::CommandSystem(cString cur_string)
 {
+  if (cur_string.GetSize() == 0) {
+    cerr << "Error: Keyword \"system\" must be followed by command to run." << endl;
+    if (exit_on_error) exit(1);
+  }
+
   cout << "Running System Command: " << cur_string << endl;
   
   system(cur_string);
@@ -7704,9 +7705,41 @@
       cerr << "Error: Unknown analysis keyword '" << command << "'." << endl;
       if (exit_on_error) exit(1);
     }    
+   }
+ }
+
+
+ // const cFlexVar & stat, std::ostream& fp, int compare=0, const cString & null_keyword="0",
+ // 		     const cString & html_cell_flags="align=center", bool print_text=true);
+
+ void cAnalyze::HTMLPrintStat(tDataEntryCommand<cAnalyzeGenotype> * command, std::ostream& fp,
+			      int compare, bool print_text)
+{
+  fp << "<td " << command->GetHtmlCellFlags() << " ";
+  if (compare == -2) {
+    fp << "bgcolor=\"#" << m_world->GetConfig().COLOR_NEG2.Get() << "\">";
+    if (print_text == true) fp << command->GetNull() << " ";
+    else fp << "&nbsp; ";
+    return;
   }
+  
+  if (compare == -1)     fp << "bgcolor=\"#" << m_world->GetConfig().COLOR_NEG1.Get() << "\">";
+  else if (compare == 0) fp << ">";
+  else if (compare == 1) fp << "bgcolor=\"#" << m_world->GetConfig().COLOR_POS1.Get() << "\">";
+  else if (compare == 2) fp << "bgcolor=\"#" << m_world->GetConfig().COLOR_POS2.Get() << "\">";
+  else {
+    std::cerr << "Error! Illegal case in Compare:" << compare << std::endl;
+    exit(0);
+  }
+  
+  if (print_text == true) fp << command->GetValue().AsString() << " ";
+  else fp << "&nbsp; ";
+  
 }
 
+
+
+
 // A basic macro to link a keyword to a description and Get and Set methods in cAnalyzeGenotype.
 #define ADD_GDATA(TYPE, KEYWORD, DESC, GET, SET, COMP, NSTR, HSTR)                                         \
 {                                                                                                          \

Modified: development/source/analyze/cAnalyze.h
===================================================================
--- development/source/analyze/cAnalyze.h	2007-06-27 19:43:41 UTC (rev 1721)
+++ development/source/analyze/cAnalyze.h	2007-06-27 20:55:22 UTC (rev 1722)
@@ -145,6 +145,10 @@
   void PreProcessArgs(cString & args);
   void ProcessCommands(tList<cAnalyzeCommand> & clist);
 
+  void HTMLPrintStat(tDataEntryCommand<cAnalyzeGenotype> * command, std::ostream& fp, int compare=0,
+		     bool print_text=true);
+
+  // Deal with genotype data list (linking keywords to stats)
   void SetupGenotypeDataList();	
   void LoadGenotypeDataList(cStringList arg_list,
 	    tList< tDataEntryCommand<cAnalyzeGenotype> > & output_list);

Modified: development/source/main/cAvidaConfig.h
===================================================================
--- development/source/main/cAvidaConfig.h	2007-06-27 19:43:41 UTC (rev 1721)
+++ development/source/main/cAvidaConfig.h	2007-06-27 20:55:22 UTC (rev 1722)
@@ -374,6 +374,18 @@
   CONFIG_ADD_VAR(REGULATION_STRENGTH, double, 1, "Strength added or subtracted to a promoter by regulation.");
   CONFIG_ADD_VAR(REGULATION_DECAY_FRAC, double, 0.1, "Fraction of regulation that decays away. \nMax regulation = 2^(REGULATION_STRENGTH/REGULATION_DECAY_FRAC)");
 
+  CONFIG_ADD_GROUP(COLORS_GROUP, "Output colors for when data files are printed in HTML mode.\nThere are two sets of these; the first are for lineages,\nand the second are for mutation tests.");
+  CONFIG_ADD_VAR(COLOR_CHANGE, cString, "CCCCFF", "Color to flag stat that has changed since parent.");
+  CONFIG_ADD_VAR(COLOR_NEG2, cString, "FF0000", "Color to flag stat that is significantly worse than parent.");
+  CONFIG_ADD_VAR(COLOR_NEG1, cString, "FFCCCC", "Color to flag stat that is minorly worse than parent.");
+  CONFIG_ADD_VAR(COLOR_POS1, cString, "CCFFCC", "Color to flag stat that is minorly better than parent.");
+  CONFIG_ADD_VAR(COLOR_POS2, cString, "00FF00", "Color to flag stat that is significantly better than parent.");
+
+  CONFIG_ADD_VAR(COLOR_MUT_POS,    cString, "00FF00", "Color to flag stat that has changed since parent.");
+  CONFIG_ADD_VAR(COLOR_MUT_NEUT,   cString, "FFFFFF", "Color to flag stat that has changed since parent.");
+  CONFIG_ADD_VAR(COLOR_MUT_NEG,    cString, "FFFF00", "Color to flag stat that has changed since parent.");
+  CONFIG_ADD_VAR(COLOR_MUT_LETHAL, cString, "FF0000", "Color to flag stat that has changed since parent.");
+
 #endif
   
   void Load(const cString& filename, const bool& crash_if_not_found);

Modified: development/source/tools/cFlexVar.h
===================================================================
--- development/source/tools/cFlexVar.h	2007-06-27 19:43:41 UTC (rev 1721)
+++ development/source/tools/cFlexVar.h	2007-06-27 20:55:22 UTC (rev 1722)
@@ -23,13 +23,13 @@
     cFlexVar_Base() { ; }
     virtual ~cFlexVar_Base() { ; }
 
-    virtual int AsInt() = 0;
-    virtual char AsChar() = 0;
-    virtual double AsDouble() = 0;
-    virtual void SetString(cString & in_str) = 0;
-    cString AsString() { cString out_str; SetString(out_str); return out_str; }
+    virtual int AsInt() const = 0;
+    virtual char AsChar() const = 0;
+    virtual double AsDouble() const = 0;
+    virtual void SetString(cString & in_str) const = 0;
+    cString AsString() const { cString out_str; SetString(out_str); return out_str; }
     
-    virtual eFlexType GetType() { return TYPE_NONE; }
+    virtual eFlexType GetType() const { return TYPE_NONE; }
   };
   
   class cFlexVar_Int : public cFlexVar_Base {
@@ -39,12 +39,12 @@
     cFlexVar_Int(int in_val) : value(in_val) { ; }
     ~cFlexVar_Int() { ; }
 
-    int AsInt() { return value; }
-    char AsChar() { return (char) value; }
-    double AsDouble() { return (double) value; }
-    void SetString(cString & in_str) { in_str.Set("%d", value); }
+    int AsInt() const { return value; }
+    char AsChar() const { return (char) value; }
+    double AsDouble() const { return (double) value; }
+    void SetString(cString & in_str) const { in_str.Set("%d", value); }
 
-    eFlexType GetType() { return TYPE_INT; }
+    eFlexType GetType() const { return TYPE_INT; }
   };
 
   class cFlexVar_Char : public cFlexVar_Base {
@@ -54,12 +54,12 @@
     cFlexVar_Char(char in_val) : value(in_val) { ; }
     ~cFlexVar_Char() { ; }
 
-    int AsInt() { return (int) value; }
-    char AsChar() { return value; }
-    double AsDouble() { return (double) value; }
-    void SetString(cString & in_str) { in_str.Set("%c", value); }
+    int AsInt() const { return (int) value; }
+    char AsChar() const { return value; }
+    double AsDouble() const { return (double) value; }
+    void SetString(cString & in_str) const { in_str.Set("%c", value); }
 
-    eFlexType GetType() { return TYPE_CHAR; }
+    eFlexType GetType() const { return TYPE_CHAR; }
   };
 
   class cFlexVar_Double : public cFlexVar_Base {
@@ -69,12 +69,12 @@
     cFlexVar_Double(double in_val) : value(in_val) { ; }
     ~cFlexVar_Double() { ; }
 
-    int AsInt() { return (int) value; }
-    char AsChar() { return (char) value; }
-    double AsDouble() { return value; }
-    void SetString(cString & in_str) { in_str.Set("%f", value); }
+    int AsInt() const { return (int) value; }
+    char AsChar() const { return (char) value; }
+    double AsDouble() const { return value; }
+    void SetString(cString & in_str) const { in_str.Set("%f", value); }
 
-    eFlexType GetType() { return TYPE_DOUBLE; }
+    eFlexType GetType() const { return TYPE_DOUBLE; }
   };
 
   class cFlexVar_String : public cFlexVar_Base {
@@ -84,29 +84,37 @@
     cFlexVar_String(const cString & in_val) : value(in_val) { ; }
     ~cFlexVar_String() { ; }
 
-    int AsInt() { return value.AsInt(); }
-    char AsChar() { return value[0]; }
-    double AsDouble() { return value.AsDouble(); }
-    void SetString(cString & in_str) { in_str = value; }
+    int AsInt() const { return value.AsInt(); }
+    char AsChar() const { return value[0]; }
+    double AsDouble() const { return value.AsDouble(); }
+    void SetString(cString & in_str) const { in_str = value; }
 
-    eFlexType GetType() { return TYPE_STRING; }
+    eFlexType GetType() const { return TYPE_STRING; }
   };
 
   cFlexVar_Base * var;
 
 public:
+  cFlexVar(const cFlexVar & in_var) : var(NULL) {
+    const eFlexType type = in_var.GetType();
+    if (type == TYPE_INT) var = new cFlexVar_Int( in_var.AsInt() );
+    else if (type == TYPE_CHAR) var = new cFlexVar_Char( in_var.AsChar() );
+    else if (type == TYPE_DOUBLE) var = new cFlexVar_Double( in_var.AsDouble() );
+    else if (type == TYPE_STRING) var = new cFlexVar_String( in_var.AsString() );
+  }
   cFlexVar(int in_value) : var(new cFlexVar_Int(in_value)) { ; }
   cFlexVar(char in_value) : var(new cFlexVar_Char(in_value)) { ; }
   cFlexVar(double in_value) : var(new cFlexVar_Double(in_value)) { ; }
   cFlexVar(const cString & in_value) : var(new cFlexVar_String(in_value)) { ; }
+  ~cFlexVar() { delete var; }
   
-  int AsInt() { return var->AsInt(); }
-  char AsChar() { return var->AsChar(); }
-  double AsDouble() { return var->AsDouble(); }
-  cString AsString() { return var->AsString(); }
-  void SetString(cString & in_str) { var->SetString(in_str); }
+  int AsInt() const { return var->AsInt(); }
+  char AsChar() const { return var->AsChar(); }
+  double AsDouble() const { return var->AsDouble(); }
+  cString AsString() const { return var->AsString(); }
+  void SetString(cString & in_str) const { var->SetString(in_str); }
   
-  eFlexType GetType() { return var->GetType(); }
+  eFlexType GetType() const { return var->GetType(); }
 };
 
 #endif

Modified: development/source/tools/tDataEntry.h
===================================================================
--- development/source/tools/tDataEntry.h	2007-06-27 19:43:41 UTC (rev 1721)
+++ development/source/tools/tDataEntry.h	2007-06-27 20:55:22 UTC (rev 1722)
@@ -28,15 +28,22 @@
 
 #include <iostream>
 
+#ifndef cFlexVar_h
+#include "cFlexVar.h"
+#endif
+
 #ifndef cString_h
 #include "cString.h"
 #endif
+
 #ifndef cStringUtil_h
 #include "cStringUtil.h"
 #endif
+
 #ifndef tDataEntryBase_h
 #include "tDataEntryBase.h"
 #endif
+
 #if USE_tMemTrack
 # ifndef tMemTrack_h
 #  include "tMemTrack.h"
@@ -74,12 +81,17 @@
   int Compare(T * other) const {
     return (DataCompare)?((this->target->*DataCompare)(other)):(0);
   }
+
   bool Set(const cString & value) {
     OUT new_value(0);
     if (DataSet == 0) return false;
     (this->target->*DataSet)( cStringUtil::Convert(value, new_value) );
     return true;
   }
+
+  cFlexVar Get() {
+    return cFlexVar( (this->target->*DataRetrieval)() );
+  }
 };
 
 #endif

Modified: development/source/tools/tDataEntryBase.h
===================================================================
--- development/source/tools/tDataEntryBase.h	2007-06-27 19:43:41 UTC (rev 1721)
+++ development/source/tools/tDataEntryBase.h	2007-06-27 20:55:22 UTC (rev 1722)
@@ -32,6 +32,11 @@
 #ifndef cDataEntry_h
 #include "cDataEntry.h"
 #endif
+
+#ifndef cFlexVar_h
+#include "cFlexVar.h"
+#endif
+
 #if USE_tMemTrack
 # ifndef tMemTrack_h
 #  include "tMemTrack.h"
@@ -57,29 +62,8 @@
   virtual bool Print(std::ostream& fp) const { (void) fp;  return false; }
   virtual int Compare(T * other) const { (void) other; return 0; }
   virtual bool Set(const cString & value) { (void) value; return false; }
+  virtual cFlexVar Get() const { return cFlexVar(0); }
 
-  void HTMLPrint(std::ostream& fp, int compare=0, bool print_text=true) {
-    fp << "<td " << GetHtmlCellFlags() << " ";
-    if (compare == -2) {
-      fp << "bgcolor=\"#FF0000\">";
-      if (print_text == true) fp << GetNull() << " ";
-      else fp << "&nbsp; ";
-      return;
-    }
-
-    if (compare == -1)     fp << "bgcolor=\"#FFCCCC\">";
-    else if (compare == 0) fp << ">";
-    else if (compare == 1) fp << "bgcolor=\"#CCFFCC\">";
-    else if (compare == 2) fp << "bgcolor=\"#00FF00\">";
-    else {
-      std::cerr << "Error! Illegal case in Compare:" << compare << std::endl;
-      exit(0);
-    }
-
-    if (print_text == true) fp << *this << " ";
-    else fp << "&nbsp; ";
-  }
-
   cString AsString() {
     std::stringstream tmp_stream;
     tmp_stream << *this;

Modified: development/source/tools/tDataEntryCommand.h
===================================================================
--- development/source/tools/tDataEntryCommand.h	2007-06-27 19:43:41 UTC (rev 1721)
+++ development/source/tools/tDataEntryCommand.h	2007-06-27 20:55:22 UTC (rev 1722)
@@ -28,9 +28,14 @@
 
 #include <iostream>
 
+#ifndef cFlexVar_h
+#define "cFlexVar.h"
+#endif
+
 #ifndef cStringList_h
 #include "cStringList.h"
 #endif
+
 #ifndef tDataEntryBase_h
 #include "tDataEntryBase.h"
 #endif
@@ -53,15 +58,13 @@
   const cString & GetName() const { return data_entry->GetName(); }
   const cString & GetDesc() const { return data_entry->GetDesc(); }
   const cString & GetNull() const { return data_entry->GetNull(); }
-  const cString & GetHtmlCellFlags() const
-    { return data_entry->GetHtmlCellFlags(); }
+  const cString & GetHtmlCellFlags() const { return data_entry->GetHtmlCellFlags(); }
+  cFlexVar GetValue() const { return data_entry->Get(); }
 
   void SetTarget(T * _target) { data_entry->SetTarget(_target); }
   bool Print(std::ostream& fp) const { return data_entry->Print(fp); }
   int Compare(T * other) const { return data_entry->Compare(other); }
   bool SetValue(const cString & value) { return data_entry->Set(value); }
-  void HTMLPrint(std::ostream& fp, int compare=0, bool print_text=true)
-    { data_entry->HTMLPrint(fp, compare, print_text); }
 };
 
 #endif




More information about the Avida-cvs mailing list