From 9c6121604a3689f6b7d8e7d5da4f6fc12070674f Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 30 Apr 2002 05:07:52 +0000 Subject: [PATCH] Added the calls to EO::printOn and EO::readFrom in the corresponding methods so th euser does not forget to use these before writing/reading the actual eo --- eo/tutorial/Templates/eoMyStruct.tmpl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eo/tutorial/Templates/eoMyStruct.tmpl b/eo/tutorial/Templates/eoMyStruct.tmpl index f36875168..d5c972557 100644 --- a/eo/tutorial/Templates/eoMyStruct.tmpl +++ b/eo/tutorial/Templates/eoMyStruct.tmpl @@ -40,11 +40,20 @@ public: // END Code of default Ctor of an eoMyStruct object } + virtual ~eoMyStruct() + { + // START Code of Destructor of an eoEASEAGenome object + // END Code of Destructor of an eoEASEAGenome object + } + virtual string className() const { return "eoMyStruct"; } /** printing... */ void printOn(ostream& os) const { + // First write the fitness + EO::printOn(os); + os << ' '; // START Code of default output /** HINTS @@ -60,6 +69,8 @@ public: */ void readFrom(istream& is) { + // of course you should read the fitness first! + EO::readFrom(is); // START Code of input /** HINTS