#pragma once #include "Trait.h" #include #include #include class Phenotype { friend class GenotypeToPhenotypeStrategy; friend class InOutBreedingGenotypeToPhenotypeStrategy; friend class KolchShindyalGenotypeToPhenotypeStrategy; friend class PhenotypeToFitnessStrategy; friend std::ostream& operator << (std::ostream& os, const Phenotype& p); protected: //std::vector traits; std::map traitsMap; public: Phenotype() { }; Phenotype(const std::map& _tm) : traitsMap(_tm) {} Phenotype(Trait _trait); Trait getTraitByName(std::string name) const {return this->traitsMap.find(name)->second;}; void addTrait(Trait _trait); std::string toSimpleString() const; };