Ignore:
Timestamp:
02/26/14 20:21:22 (10 years ago)
Author:
sz
Message:

Genetics reorganization (affects ALL applications!):

  • Converters/Validators? are now configured/initialized in a more verbose but also less confusing way
  • At the same time, the PreconfiguredGenetics? object will help you avoid the increased complexity by creating the ready-to-use environment that is sufficient in 99% of cases (see the demos)
  • Format F genetics updated (work in progress)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/geno.h

    r121 r145  
    1111class MultiMap;
    1212class Geno;
     13class GenoConvManager;
    1314
    1415class GenoValidator
     
    1819};
    1920
     21/// basic GenoValidator that works by building a Model from any Geno (by converting to f0)
     22/// validation fails when the model can't be built or the genotype can't be converted
     23class ModelGenoValidator: public GenoValidator
     24{
     25public:
     26        int testGenoValidity(Geno& g);
     27};
     28
    2029/// basic information about a single genotype.
    2130class Geno: public DestrBase
    2231{
     32friend class Simulator;//needs to access validators directly
    2333SString gen;
    2434SString name;
     
    103113
    104114void* owner;
     115
     116// managing global Geno-related objects (used for validation and conversion)
     117static void addValidator(GenoValidator* gv) {validators+=gv;}
     118static void removeValidator(GenoValidator* gv) {validators-=gv;}
     119static void useConverters(GenoConvManager& gcm) {converters=&gcm;}
     120static GenoConvManager &getConverters() {return *converters;}
     121  protected:
     122static GenoConvManager *converters;
    105123static SListTempl<GenoValidator*> validators;
    106124};
Note: See TracChangeset for help on using the changeset viewer.