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