Cleanup code.
[genetic.git] / src / gene.h
1 #ifndef __GENE_H
2 #define __GENE_H
3
4 namespace genetic {
5
6     /**
7      * Gene.
8      */
9     template < typename Type >
10     class Gene {
11     protected:
12         Type value;
13     public:
14         Gene() {}
15
16         Gene(Type value) {
17             this->value = value;
18         }
19
20         /** Copy constructor */
21         Gene(const Gene& gene) : value(gene.get()) {}
22
23         Gene& operator=(const Gene&){
24             return *this;
25         }
26
27         Type get() const {
28             return value;
29         }
30     };
31 }
32
33 #endif /* __GENE_H */