diff options
Diffstat (limited to 'src/phenotype.h')
-rw-r--r-- | src/phenotype.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/phenotype.h b/src/phenotype.h index 7c564d5..0eafb78 100644 --- a/src/phenotype.h +++ b/src/phenotype.h | |||
@@ -2,6 +2,10 @@ | |||
2 | #define GENETIC_PHENOTYPE_H | 2 | #define GENETIC_PHENOTYPE_H |
3 | 3 | ||
4 | #include <bu/string.h> | 4 | #include <bu/string.h> |
5 | #include <bu/hash.h> | ||
6 | #include <bu/variant.h> | ||
7 | |||
8 | #include "genetic/config.h" | ||
5 | 9 | ||
6 | namespace Genetic | 10 | namespace Genetic |
7 | { | 11 | { |
@@ -29,7 +33,22 @@ namespace Genetic | |||
29 | 33 | ||
30 | virtual Bu::String toString()=0; | 34 | virtual Bu::String toString()=0; |
31 | 35 | ||
36 | bool hasProperty( const Bu::String &sKey ) const; | ||
37 | Bu::Variant getProperty( const Bu::String &sKey ) const; | ||
38 | void setProperty( const Bu::String &sKey, Bu::Variant vValue ); | ||
39 | void setCreated( Genetic::Time t, Genetic::PhenotypeId id ) | ||
40 | { tCreated = t; uId = id; bActive = true; } | ||
41 | Genetic::Time getCreated() const { return tCreated; } | ||
42 | Genetic::PhenotypeId getId() const { return uId; } | ||
43 | |||
44 | bool isActive() const { return bActive; } | ||
45 | |||
32 | private: | 46 | private: |
47 | Genetic::Time tCreated; | ||
48 | Genetic::PhenotypeId uId; | ||
49 | bool bActive; | ||
50 | typedef Bu::Hash<Bu::String, Bu::Variant> PropHash; | ||
51 | PropHash hProp; | ||
33 | }; | 52 | }; |
34 | }; | 53 | }; |
35 | 54 | ||