template < typename Type >
class Gene {
protected:
- Type fenotype;
+ Type value;
public:
- Gene(Type fenotype) {
- this->fenotype = fenotype;
+ Gene() {}
+
+ Gene(Type value) {
+ this->value = value;
+ }
+
+ /** Copy constructor */
+ Gene(const Gene& gene) : value(gene.get()) {}
+
+ Gene& operator=(const Gene&){
+ return *this;
}
- Type get() {
- return this->fenotype;
+ Type get() const {
+ return value;
}
};
}