From a48556c1c5c01892cf493cd3eb4ff969a2f548fd Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 9 Jul 2012 15:34:11 -0600 Subject: Simple saving/loading - consider this temporary. It should be a little more compact, and have more header info so we can reconstruct the entire object from the file, right now you have to know the size in bits. --- src/phenotypebinary.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/phenotypebinary.h') diff --git a/src/phenotypebinary.h b/src/phenotypebinary.h index cbae392..f312187 100644 --- a/src/phenotypebinary.h +++ b/src/phenotypebinary.h @@ -3,6 +3,8 @@ #include "genetic/phenotype.h" +#include + namespace Genetic { class PhenotypeBinary : public Phenotype @@ -22,6 +24,9 @@ namespace Genetic void extractBits( uint32_t &rTarget, int iStart, int iBits ); void extractBits( uint64_t &rTarget, int iStart, int iBits ); + void write( Bu::Stream &rStream ); + void read( Bu::Stream &rStream ); + private: int iSize; int iWords; -- cgit v1.2.3