Ignore:
Timestamp:
04/07/15 04:20:14 (7 years ago)
Author:
Maciej Komosinski
Message:

Each thread can use its own simulator's GenMan?

File:
1 edited

Legend:

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

    r286 r346  
    5454
    5555public:
     56        typedef SListTempl<GenoValidator*> Validators;
     57
    5658        /// create a genotype object from primitives
    5759        /// @param genstring pure genotype, without any comments
     
    116118
    117119        // managing global Geno-related objects (used for validation and conversion)
    118         static void addValidator(GenoValidator* gv) { validators += gv; }
    119         static void removeValidator(GenoValidator* gv) { validators -= gv; }
     120        static Validators& getValidators();
     121        static void addValidator(GenoValidator* gv,int at_position=9999) { getValidators().insert(at_position,gv); }
     122        static void removeValidator(GenoValidator* gv) { getValidators() -= gv; }
    120123        static void useConverters(GenoConvManager& gcm) { converters = &gcm; }
    121124        static GenoConvManager &getConverters() { return *converters; }
    122125protected:
    123126        static GenoConvManager *converters;
    124         static SListTempl<GenoValidator*> validators;
    125127};
    126128
Note: See TracChangeset for help on using the changeset viewer.